mirror of
https://github.com/Troplo/Colubrina.git
synced 2024-12-29 09:46:10 +11:00
44 lines
857 B
JavaScript
44 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');
|
||
|
*/
|
||
|
}
|
||
|
}
|