text: "use strict"
  module.exports = {
    up: (queryInterface, Sequelize) => {
      return queryInterface.createTable("Messages", {
        id: {
          allowNull: false,
          autoIncrement: true,
          primaryKey: true,
          type: Sequelize.INTEGER,
        },
        issueId: {
          type: Sequelize.INTEGER,
          references: {
            model: {
              tableName: "Issues",
            },
            key: "id",
          },
          allowNull: false,
        },
        fromConsultantId: {
          type: Sequelize.INTEGER,
        },
        title: {
          type: Sequelize.STRING,
        },
        message: {
          type: Sequelize.TEXT,
        },
        statusId: {
          type: Sequelize.INTEGER,
          references: {
            model: {
              tableName: "MessageStatuses",
            },
            key: "id",
          },
          allowNull: false,
        },
        createdAt: {
          allowNull: false,
          type: Sequelize.DATE,
        },
        updatedAt: {
          allowNull: false,
          type: Sequelize.DATE,
        },
      })
    },
    down: (queryInterface, Sequelize) => {
      return queryInterface.dropTable("Messages")
    },
  }
  