Created
May 3, 2021 11:11
-
-
Save tlcheah2/c54ef8d77e5ad06f98fe2cd0d113cd11 to your computer and use it in GitHub Desktop.
Sample of Migration Script - Create User Table
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
'use strict'; | |
module.exports = { | |
up: (queryInterface, Sequelize) => queryInterface.createTable('users', { | |
name: Sequelize.DataTypes.STRING, | |
email: Sequelize.DataTypes.STRING, | |
password: Sequelize.DataTypes.STRING, | |
isPaidMember: Sequelize.DataTypes.BOOLEAN | |
}), | |
down: (queryInterface, Sequelize) => queryInterface.dropTable('users'), | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment