不要怂,就是干,撸起袖子干!

Commit c4606736 by Björn Dahlgren

Failing test with field name for primary attribute

1 parent 305efb3a
Showing with 8 additions and 1 deletions
...@@ -19,6 +19,13 @@ describe(Support.getTestDialectTeaser("Model"), function () { ...@@ -19,6 +19,13 @@ describe(Support.getTestDialectTeaser("Model"), function () {
var queryInterface = this.sequelize.getQueryInterface(); var queryInterface = this.sequelize.getQueryInterface();
this.User = this.sequelize.define('user', { this.User = this.sequelize.define('user', {
id: {
type: DataTypes.INTEGER,
allowNull: false,
primaryKey: true,
autoIncrement: true,
field: 'userId'
},
name: { name: {
type: DataTypes.STRING, type: DataTypes.STRING,
field: 'full_name' field: 'full_name'
...@@ -54,7 +61,7 @@ describe(Support.getTestDialectTeaser("Model"), function () { ...@@ -54,7 +61,7 @@ describe(Support.getTestDialectTeaser("Model"), function () {
return Promise.all([ return Promise.all([
queryInterface.createTable('users', { queryInterface.createTable('users', {
id: { userId: {
type: DataTypes.INTEGER, type: DataTypes.INTEGER,
allowNull: false, allowNull: false,
primaryKey: true, primaryKey: true,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!