mirror of
https://github.com/Troplo/Colubrina.git
synced 2024-12-28 17:26:11 +11:00
43 lines
857 B
JavaScript
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');
|
|
*/
|
|
}
|
|
}
|