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