35 lines
740 B
JavaScript
35 lines
740 B
JavaScript
module.exports = {
|
|
up: (queryInterface, Sequelize) => {
|
|
return queryInterface.createTable('Users', {
|
|
id: {
|
|
allowNull: false,
|
|
autoIncrement: true,
|
|
primaryKey: true,
|
|
type: Sequelize.INTEGER
|
|
},
|
|
firstName: {
|
|
type: Sequelize.STRING
|
|
},
|
|
lastName: {
|
|
type: Sequelize.STRING
|
|
},
|
|
email: {
|
|
type: Sequelize.STRING
|
|
},
|
|
password: {
|
|
type: Sequelize.STRING
|
|
},
|
|
createdAt: {
|
|
allowNull: false,
|
|
type: Sequelize.DATE
|
|
},
|
|
updatedAt: {
|
|
allowNull: false,
|
|
type: Sequelize.DATE
|
|
}
|
|
})
|
|
},
|
|
down: (queryInterface, Sequelize) => {
|
|
return queryInterface.dropTable('Users')
|
|
}
|
|
}
|