Colubrina/backend/migrations/20220323084558-create-users.js

30 lines
638 B
JavaScript
Raw Normal View History

2022-06-05 22:58:18 +10:00
"use strict"
module.exports = {
up: async (queryInterface, Sequelize) => {
await queryInterface.createTable("Users", {
id: {
allowNull: false,
autoIncrement: true,
primaryKey: true,
2022-07-29 23:32:52 +10:00
type: Sequelize.BIGINT
2022-06-05 22:58:18 +10:00
},
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")
}
}