mirror of
https://github.com/Troplo/Colubrina.git
synced 2024-11-23 19:56:43 +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');
|
|
*/
|
|
}
|
|
}
|