Created
August 18, 2017 02:50
-
-
Save unicodeveloper/2ef8f5e87378fd6062424068e9c363ca 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
// Define our users table migration | |
module.exports = { | |
up: (queryInterface, Sequelize) => { | |
return queryInterface.createTable(‘users’, { | |
id: { | |
type: Sequelize.INTEGER, | |
primaryKey: true, | |
autoIncrement: true, | |
}, | |
email: { | |
type: Sequelize.STRING, | |
}, | |
password: { | |
type: Sequelize.STRING, | |
}, | |
firstname: { | |
type: Sequelize.STRING, | |
}, | |
lastname: { | |
type: Sequelize.STRING, | |
}, | |
bio: { | |
type: Sequelize.TEXT, | |
}, | |
createdAt: { | |
type: Sequelize.DATE, | |
}, | |
updatedAt: { | |
type: Sequelize.DATE, | |
}, | |
}); | |
}, | |
down: (queryInterface, Sequelize) => { | |
return queryInterface.dropTable(‘users’); | |
}, | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment