Colubrina/backend/migrations/20220731050926-pins.js

43 lines
829 B
JavaScript
Raw Permalink Normal View History

2022-07-31 18:42:36 +10:00
"use strict"
module.exports = {
async up(queryInterface, Sequelize) {
await queryInterface.createTable("Pins", {
id: {
type: Sequelize.BIGINT,
primaryKey: true,
autoIncrement: true
},
pinnedById: {
type: Sequelize.BIGINT,
allowNull: false
},
messageId: {
type: Sequelize.BIGINT,
allowNull: false
},
chatId: {
type: Sequelize.BIGINT,
allowNull: false
},
createdAt: {
type: Sequelize.DATE,
allowNull: false
},
updatedAt: {
type: Sequelize.DATE,
allowNull: false
}
})
},
async down(queryInterface, Sequelize) {
/**
* Add reverting commands here.
*
* Example:
* await queryInterface.dropTable('users');
*/
}
}