'use strict';
/** @type {import('sequelize-cli').Migration} */
module.exports = {
  async up(queryInterface, Sequelize) {
    await queryInterface.createTable('invoices', {
      inv_id: {
        primaryKey: true,
        type: Sequelize.STRING
      },
      inv_name: {
        type: Sequelize.STRING
      },
      inv_status: {
        type: Sequelize.STRING
      },
      phoneNumber: {
        type: Sequelize.STRING
      },
      inv_type: {
        type: Sequelize.STRING
      },
      content: {
        type: Sequelize.TEXT('long')
      },
      isFile: {
        type: Sequelize.BOOLEAN
      },
      pdfName: {
        type: Sequelize.STRING
      },
      pdfCreated: {
        type: Sequelize.BOOLEAN
      },
      delivered: {
        type: Sequelize.BOOLEAN
      },
      createdAt: {
        allowNull: false,
        type: Sequelize.DATE
      },
      updatedAt: {
        allowNull: false,
        type: Sequelize.DATE
      }
    });
  },
  async down(queryInterface, Sequelize) {
    await queryInterface.dropTable('invoices');
  }
};