You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
var User = persistence.define('User', {
name: "TEXT",
age: "INTEGER"
});
persistence.schemaSync();
user表有两个字段 name 和 age 我现在想增加一个字段比如 sex
var User = persistence.define('User', {
name: "TEXT",
age: "INTEGER",
sex:"TEXT"
}); 当我这样写完之后,重新运行程序sex字段却不存在 , 需要我卸载应用重新生成数据库才能建立此字段。 这个问题如何解决呢? 总不能每次表结构变动了 就重新安装程序吧,求大神指导。。
The text was updated successfully, but these errors were encountered:
我是做移动开发
比如现在有个表user
if (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();
user表有两个字段 name 和 age 我现在想增加一个字段比如 sex
var User = persistence.define('User', {
name: "TEXT",
age: "INTEGER",
sex:"TEXT"
}); 当我这样写完之后,重新运行程序sex字段却不存在 , 需要我卸载应用重新生成数据库才能建立此字段。 这个问题如何解决呢? 总不能每次表结构变动了 就重新安装程序吧,求大神指导。。
The text was updated successfully, but these errors were encountered: