Skip to content

Instantly share code, notes, and snippets.

04b9ae05fedc51278eb46dcdf77f1dd8999b0709b69ad564122e90153a07e623b992ceea2fb8d79b360c04e37129d7053a192d7f504cd2df699140c2bccb8452fd;bdunavant

Keybase proof

I hereby claim:

  • I am yargevad on github.
  • I am yargevad (https://keybase.io/yargevad) on keybase.
  • I have a public key whose fingerprint is 08BF 6EE4 A9B6 4F1C 3F94 AFE2 294D 7A4A A69C EE78

To claim this, I am signing this object:

@yargevad
yargevad / gist:5874279
Created June 27, 2013 05:59
Code to migrate existing test data from WebSQL to PG-SQLitePlugin-iOS
function onDeviceReady() {
db = window.openDatabase('testdata', '0.1', 'Test Data', 1048576);
db1 = window.sqlitePlugin.openDatabase({name: 'test_data'});
migrateData(db, db1, 'table1', [ 'col1', 'col2', 'col3', 'col4']);
migrateData(db, db1, 'table2', [ 'col1', 'col2']);
}
function migrateData(fr, to, tname, cols) {
try {
console.log('migrating table ['+ tname +'] ('+ cols.join() +')');