我已经在计算机上安装了所有内容,但我仍然遇到了这些错误:
未处理拒绝SequelizeDatabaseError:SQLITE_ERROR:表用户 没有名为last_name的列 在Query.formatError(/Users/kamran/developer/WEB/WebCourse/p3/node_modules/sequelize/lib/dialects/sqlite/query.js:242:14) at /Users/kamran/developer/WEB/WebCourse/p3/node_modules/sequelize/lib/dialects/sqlite/query.js:47:29 在Statement.errBack(/Users/kamran/developer/WEB/WebCourse/p3/node_modules/sqlite3/lib/sqlite3.js:16:21)
这是我的代码:
List<NameValuePair> params = new ArrayList<NameValuePair>();
params.add(new BasicNameValuePair("email", email));
这是我的模特:
'use strict';
module.exports = function(sequelize, DataTypes) {
var User = sequelize.define('User', {
first_name: DataTypes.STRING,
last_name: DataTypes.STRING,
username: DataTypes.STRING,
password: DataTypes.STRING,
photo_base64: DataTypes.STRING
}, {
classMethods: {
associate: function(models) {
// associations can be defined here
}
}
});
return User;
};