'use strict';

module.exports = {
  async up(queryInterface, Sequelize) {
    await queryInterface.addColumn('subcontract_dc', 'delivery_address', {
      type: Sequelize.TEXT,
      allowNull: true
    });
    await queryInterface.addColumn('subcontract_dc', 'transport_name', {
      type: Sequelize.STRING(120),
      allowNull: true
    });
    await queryInterface.addColumn('subcontract_dc', 'vehicle_no', {
      type: Sequelize.STRING(40),
      allowNull: true
    });
    await queryInterface.addColumn('subcontract_dc', 'driver_name', {
      type: Sequelize.STRING(120),
      allowNull: true
    });
    await queryInterface.addColumn('subcontract_dc', 'driver_phone', {
      type: Sequelize.STRING(20),
      allowNull: true
    });
    await queryInterface.addColumn('subcontract_dc', 'eway_bill_no', {
      type: Sequelize.STRING(80),
      allowNull: true
    });
  },

  async down(queryInterface) {
    await queryInterface.removeColumn('subcontract_dc', 'eway_bill_no');
    await queryInterface.removeColumn('subcontract_dc', 'driver_phone');
    await queryInterface.removeColumn('subcontract_dc', 'driver_name');
    await queryInterface.removeColumn('subcontract_dc', 'vehicle_no');
    await queryInterface.removeColumn('subcontract_dc', 'transport_name');
    await queryInterface.removeColumn('subcontract_dc', 'delivery_address');
  }
};
