Skip to content

Instantly share code, notes, and snippets.

@tlcheah2
Created May 3, 2021 11:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tlcheah2/c54ef8d77e5ad06f98fe2cd0d113cd11 to your computer and use it in GitHub Desktop.
Save tlcheah2/c54ef8d77e5ad06f98fe2cd0d113cd11 to your computer and use it in GitHub Desktop.
Sample of Migration Script - Create User Table
'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