mirror of
https://github.com/Troplo/Colubrina.git
synced 2024-11-25 04:36:44 +11:00
44 lines
919 B
JavaScript
44 lines
919 B
JavaScript
"use strict"
|
|
|
|
module.exports = {
|
|
up: async (queryInterface, Sequelize) => {
|
|
await queryInterface.createTable("ChatAssociations", {
|
|
id: {
|
|
allowNull: false,
|
|
autoIncrement: true,
|
|
primaryKey: true,
|
|
type: Sequelize.BIGINT
|
|
},
|
|
chatId: {
|
|
type: Sequelize.BIGINT,
|
|
allowNull: false
|
|
},
|
|
userId: {
|
|
type: Sequelize.BIGINT,
|
|
allowNull: false
|
|
},
|
|
rank: {
|
|
type: Sequelize.ENUM(["member", "admin"]),
|
|
defaultValue: "member",
|
|
allowNull: false
|
|
},
|
|
createdAt: {
|
|
allowNull: false,
|
|
type: Sequelize.DATE
|
|
},
|
|
updatedAt: {
|
|
allowNull: false,
|
|
type: Sequelize.DATE
|
|
}
|
|
})
|
|
},
|
|
|
|
down: async (queryInterface, Sequelize) => {
|
|
/**
|
|
* Add reverting commands here.
|
|
*
|
|
* Example:
|
|
* await queryInterface.dropTable('users');
|
|
*/
|
|
}
|
|
}
|