UNPKG

synt_backend

Version:

Synt light-weight node backend service

51 lines (50 loc) 1.19 kB
"use strict"; module.exports = { up: async (queryInterface, Sequelize) => { await queryInterface.createTable("ChangeRequests", { id: { allowNull: false, autoIncrement: true, primaryKey: true, type: Sequelize.INTEGER, }, UserId: { type: Sequelize.INTEGER, references: { model: "Users", key: "id", }, allowNull: true, defaultValue: Sequelize.UUIDV4, onUpdate: "CASCADE", onDelete: "SET NULL", // meeting should not be deleted when user is deleted }, description: { type: Sequelize.STRING, }, old_value: { type: Sequelize.STRING, defaultValue: "", }, new_value: { allowNull: false, type: Sequelize.STRING, }, is_done: { type: Sequelize.BOOLEAN, defaultValue: false, }, createdAt: { allowNull: false, type: Sequelize.DATE, }, updatedAt: { allowNull: false, type: Sequelize.DATE, }, }); }, down: async (queryInterface) => { await queryInterface.dropTable("ChangeRequests"); }, };