Colubrina/backend/migrations/20220706061900-nicknames.js
2022-07-29 01:12:29 +10:00

43 lines
857 B
JavaScript

"use strict"
module.exports = {
async up(queryInterface, Sequelize) {
await queryInterface.createTable("Nicknames", {
id: {
allowNull: false,
autoIncrement: true,
primaryKey: true,
type: Sequelize.BIGINT
},
userId: {
allowNull: false,
type: Sequelize.BIGINT
},
nickname: {
allowNull: false,
type: Sequelize.STRING
},
friendId: {
allowNull: false,
type: Sequelize.BIGINT
},
createdAt: {
allowNull: false,
type: Sequelize.DATE
},
updatedAt: {
allowNull: false,
type: Sequelize.DATE
}
})
},
async down(queryInterface, Sequelize) {
/**
* Add reverting commands here.
*
* Example:
* await queryInterface.dropTable('users');
*/
}
}