Open FeiCheung opened 8 years ago
my code: f (window.openDatabase) { persistence.store.websql.config(persistence, 'testdb', 'My SQLite database', 5 * 1024 * 1024); } else { persistence.store.memory.config(persistence); }
var User = persistence.define('User', { name: "TEXT", age: "INTEGER" }); persistence.schemaSync();
my app's being in production I want to add a new field ‘sex’ to the 'user'schema.
var User = persistence.define('User', { name: "TEXT", age: "INTEGER", sex:"TEXT" });
I dont want uninstall my app , how could I add this field ?? thanks for help
you can check https://github.com/coresmart/persistencejs/blob/master/docs/migrations.md
my code: f (window.openDatabase) { persistence.store.websql.config(persistence, 'testdb', 'My SQLite database', 5 * 1024 * 1024); } else { persistence.store.memory.config(persistence); }
var User = persistence.define('User', { name: "TEXT", age: "INTEGER" }); persistence.schemaSync();
my app's being in production I want to add a new field ‘sex’ to the 'user'schema.
var User = persistence.define('User', { name: "TEXT", age: "INTEGER", sex:"TEXT" });
I dont want uninstall my app , how could I add this field ?? thanks for help