mirror of
https://github.com/Troplo/Colubrina.git
synced 2024-11-26 04:59:12 +11:00
30 lines
639 B
JavaScript
30 lines
639 B
JavaScript
|
"use strict"
|
||
|
module.exports = {
|
||
|
up: async (queryInterface, Sequelize) => {
|
||
|
await queryInterface.createTable("Users", {
|
||
|
id: {
|
||
|
allowNull: false,
|
||
|
autoIncrement: true,
|
||
|
primaryKey: true,
|
||
|
type: Sequelize.INTEGER
|
||
|
},
|
||
|
username: {
|
||
|
allowNull: false,
|
||
|
type: Sequelize.STRING,
|
||
|
unique: true
|
||
|
},
|
||
|
createdAt: {
|
||
|
allowNull: false,
|
||
|
type: Sequelize.DATE
|
||
|
},
|
||
|
updatedAt: {
|
||
|
allowNull: false,
|
||
|
type: Sequelize.DATE
|
||
|
}
|
||
|
})
|
||
|
},
|
||
|
down: async (queryInterface, Sequelize) => {
|
||
|
await queryInterface.dropTable("Users")
|
||
|
}
|
||
|
}
|