Created
June 14, 2018 12:57
-
-
Save csorlandi/21d53c59d9a20c7c03a77ffc5b0838d9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
up: (queryInterface, DataTypes) => { | |
queryInterface.createTable('Users', { | |
id: { | |
allowNull: false, | |
autoIncrement: true, | |
primaryKey: true, | |
type: DataTypes.INTEGER, | |
}, | |
name: { | |
allowNull: false, | |
type: DataTypes.STRING, | |
}, | |
email: { | |
allowNull: false, | |
type: DataTypes.STRING, | |
unique: true, | |
}, | |
password: { | |
allowNull: false, | |
type: DataTypes.STRING, | |
}, | |
createdAt: { | |
allowNull: false, | |
type: DataTypes.DATE, | |
}, | |
updatedAt: { | |
allowNull: false, | |
type: DataTypes.DATE, | |
}, | |
}); | |
}, | |
down: (queryInterface) => { | |
queryInterface.dropTable('Users'); | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment