module.exports = {
  /**
   * @param {QueryInterface} queryInterface
   * @param {Sequelize} Sequelize
   * @returns {Promise<void>}
   */
  async up(queryInterface, Sequelize) {
    /**
     * @type {Transaction}
     */
    const transaction = await queryInterface.sequelize.transaction();
    try {
      await queryInterface.createTable(
        'users',
        {
          id: {
            type: Sequelize.DataTypes.UUID,
            defaultValue: Sequelize.DataTypes.UUIDV4,
            primaryKey: true,
          },
          createdById: {
            type: Sequelize.DataTypes.UUID,
            references: {
              key: 'id',
              model: 'users',
            },
          },
          updatedById: {
            type: Sequelize.DataTypes.UUID,
            references: {
              key: 'id',
              model: 'users',
            },
          },
          createdAt: { type: Sequelize.DataTypes.DATE },
          updatedAt: { type: Sequelize.DataTypes.DATE },
          deletedAt: { type: Sequelize.DataTypes.DATE },
          importHash: {
            type: Sequelize.DataTypes.STRING(255),
            allowNull: true,
            unique: true,
          },
        },
        { transaction },
      );

      await queryInterface.createTable(
        'app_accounts',
        {
          id: {
            type: Sequelize.DataTypes.UUID,
            defaultValue: Sequelize.DataTypes.UUIDV4,
            primaryKey: true,
          },
          createdById: {
            type: Sequelize.DataTypes.UUID,
            references: {
              key: 'id',
              model: 'users',
            },
          },
          updatedById: {
            type: Sequelize.DataTypes.UUID,
            references: {
              key: 'id',
              model: 'users',
            },
          },
          createdAt: { type: Sequelize.DataTypes.DATE },
          updatedAt: { type: Sequelize.DataTypes.DATE },
          deletedAt: { type: Sequelize.DataTypes.DATE },
          importHash: {
            type: Sequelize.DataTypes.STRING(255),
            allowNull: true,
            unique: true,
          },
        },
        { transaction },
      );

      await queryInterface.createTable(
        'applications',
        {
          id: {
            type: Sequelize.DataTypes.UUID,
            defaultValue: Sequelize.DataTypes.UUIDV4,
            primaryKey: true,
          },
          createdById: {
            type: Sequelize.DataTypes.UUID,
            references: {
              key: 'id',
              model: 'users',
            },
          },
          updatedById: {
            type: Sequelize.DataTypes.UUID,
            references: {
              key: 'id',
              model: 'users',
            },
          },
          createdAt: { type: Sequelize.DataTypes.DATE },
          updatedAt: { type: Sequelize.DataTypes.DATE },
          deletedAt: { type: Sequelize.DataTypes.DATE },
          importHash: {
            type: Sequelize.DataTypes.STRING(255),
            allowNull: true,
            unique: true,
          },
        },
        { transaction },
      );

      await queryInterface.createTable(
        'approvals',
        {
          id: {
            type: Sequelize.DataTypes.UUID,
            defaultValue: Sequelize.DataTypes.UUIDV4,
            primaryKey: true,
          },
          createdById: {
            type: Sequelize.DataTypes.UUID,
            references: {
              key: 'id',
              model: 'users',
            },
          },
          updatedById: {
            type: Sequelize.DataTypes.UUID,
            references: {
              key: 'id',
              model: 'users',
            },
          },
          createdAt: { type: Sequelize.DataTypes.DATE },
          updatedAt: { type: Sequelize.DataTypes.DATE },
          deletedAt: { type: Sequelize.DataTypes.DATE },
          importHash: {
            type: Sequelize.DataTypes.STRING(255),
            allowNull: true,
            unique: true,
          },
        },
        { transaction },
      );

      await queryInterface.createTable(
        'audit_logs',
        {
          id: {
            type: Sequelize.DataTypes.UUID,
            defaultValue: Sequelize.DataTypes.UUIDV4,
            primaryKey: true,
          },
          createdById: {
            type: Sequelize.DataTypes.UUID,
            references: {
              key: 'id',
              model: 'users',
            },
          },
          updatedById: {
            type: Sequelize.DataTypes.UUID,
            references: {
              key: 'id',
              model: 'users',
            },
          },
          createdAt: { type: Sequelize.DataTypes.DATE },
          updatedAt: { type: Sequelize.DataTypes.DATE },
          deletedAt: { type: Sequelize.DataTypes.DATE },
          importHash: {
            type: Sequelize.DataTypes.STRING(255),
            allowNull: true,
            unique: true,
          },
        },
        { transaction },
      );

      await queryInterface.createTable(
        'benefit_plans',
        {
          id: {
            type: Sequelize.DataTypes.UUID,
            defaultValue: Sequelize.DataTypes.UUIDV4,
            primaryKey: true,
          },
          createdById: {
            type: Sequelize.DataTypes.UUID,
            references: {
              key: 'id',
              model: 'users',
            },
          },
          updatedById: {
            type: Sequelize.DataTypes.UUID,
            references: {
              key: 'id',
              model: 'users',
            },
          },
          createdAt: { type: Sequelize.DataTypes.DATE },
          updatedAt: { type: Sequelize.DataTypes.DATE },
          deletedAt: { type: Sequelize.DataTypes.DATE },
          importHash: {
            type: Sequelize.DataTypes.STRING(255),
            allowNull: true,
            unique: true,
          },
        },
        { transaction },
      );

      await queryInterface.createTable(
        'bills',
        {
          id: {
            type: Sequelize.DataTypes.UUID,
            defaultValue: Sequelize.DataTypes.UUIDV4,
            primaryKey: true,
          },
          createdById: {
            type: Sequelize.DataTypes.UUID,
            references: {
              key: 'id',
              model: 'users',
            },
          },
          updatedById: {
            type: Sequelize.DataTypes.UUID,
            references: {
              key: 'id',
              model: 'users',
            },
          },
          createdAt: { type: Sequelize.DataTypes.DATE },
          updatedAt: { type: Sequelize.DataTypes.DATE },
          deletedAt: { type: Sequelize.DataTypes.DATE },
          importHash: {
            type: Sequelize.DataTypes.STRING(255),
            allowNull: true,
            unique: true,
          },
        },
        { transaction },
      );

      await queryInterface.createTable(
        'candidates',
        {
          id: {
            type: Sequelize.DataTypes.UUID,
            defaultValue: Sequelize.DataTypes.UUIDV4,
            primaryKey: true,
          },
          createdById: {
            type: Sequelize.DataTypes.UUID,
            references: {
              key: 'id',
              model: 'users',
            },
          },
          updatedById: {
            type: Sequelize.DataTypes.UUID,
            references: {
              key: 'id',
              model: 'users',
            },
          },
          createdAt: { type: Sequelize.DataTypes.DATE },
          updatedAt: { type: Sequelize.DataTypes.DATE },
          deletedAt: { type: Sequelize.DataTypes.DATE },
          importHash: {
            type: Sequelize.DataTypes.STRING(255),
            allowNull: true,
            unique: true,
          },
        },
        { transaction },
      );

      await queryInterface.createTable(
        'cards',
        {
          id: {
            type: Sequelize.DataTypes.UUID,
            defaultValue: Sequelize.DataTypes.UUIDV4,
            primaryKey: true,
          },
          createdById: {
            type: Sequelize.DataTypes.UUID,
            references: {
              key: 'id',
              model: 'users',
            },
          },
          updatedById: {
            type: Sequelize.DataTypes.UUID,
            references: {
              key: 'id',
              model: 'users',
            },
          },
          createdAt: { type: Sequelize.DataTypes.DATE },
          updatedAt: { type: Sequelize.DataTypes.DATE },
          deletedAt: { type: Sequelize.DataTypes.DATE },
          importHash: {
            type: Sequelize.DataTypes.STRING(255),
            allowNull: true,
            unique: true,
          },
        },
        { transaction },
      );

      await queryInterface.createTable(
        'compensations',
        {
          id: {
            type: Sequelize.DataTypes.UUID,
            defaultValue: Sequelize.DataTypes.UUIDV4,
            primaryKey: true,
          },
          createdById: {
            type: Sequelize.DataTypes.UUID,
            references: {
              key: 'id',
              model: 'users',
            },
          },
          updatedById: {
            type: Sequelize.DataTypes.UUID,
            references: {
              key: 'id',
              model: 'users',
            },
          },
          createdAt: { type: Sequelize.DataTypes.DATE },
          updatedAt: { type: Sequelize.DataTypes.DATE },
          deletedAt: { type: Sequelize.DataTypes.DATE },
          importHash: {
            type: Sequelize.DataTypes.STRING(255),
            allowNull: true,
            unique: true,
          },
        },
        { transaction },
      );

      await queryInterface.createTable(
        'deductions',
        {
          id: {
            type: Sequelize.DataTypes.UUID,
            defaultValue: Sequelize.DataTypes.UUIDV4,
            primaryKey: true,
          },
          createdById: {
            type: Sequelize.DataTypes.UUID,
            references: {
              key: 'id',
              model: 'users',
            },
          },
          updatedById: {
            type: Sequelize.DataTypes.UUID,
            references: {
              key: 'id',
              model: 'users',
            },
          },
          createdAt: { type: Sequelize.DataTypes.DATE },
          updatedAt: { type: Sequelize.DataTypes.DATE },
          deletedAt: { type: Sequelize.DataTypes.DATE },
          importHash: {
            type: Sequelize.DataTypes.STRING(255),
            allowNull: true,
            unique: true,
          },
        },
        { transaction },
      );

      await queryInterface.createTable(
        'devices',
        {
          id: {
            type: Sequelize.DataTypes.UUID,
            defaultValue: Sequelize.DataTypes.UUIDV4,
            primaryKey: true,
          },
          createdById: {
            type: Sequelize.DataTypes.UUID,
            references: {
              key: 'id',
              model: 'users',
            },
          },
          updatedById: {
            type: Sequelize.DataTypes.UUID,
            references: {
              key: 'id',
              model: 'users',
            },
          },
          createdAt: { type: Sequelize.DataTypes.DATE },
          updatedAt: { type: Sequelize.DataTypes.DATE },
          deletedAt: { type: Sequelize.DataTypes.DATE },
          importHash: {
            type: Sequelize.DataTypes.STRING(255),
            allowNull: true,
            unique: true,
          },
        },
        { transaction },
      );

      await queryInterface.createTable(
        'documents',
        {
          id: {
            type: Sequelize.DataTypes.UUID,
            defaultValue: Sequelize.DataTypes.UUIDV4,
            primaryKey: true,
          },
          createdById: {
            type: Sequelize.DataTypes.UUID,
            references: {
              key: 'id',
              model: 'users',
            },
          },
          updatedById: {
            type: Sequelize.DataTypes.UUID,
            references: {
              key: 'id',
              model: 'users',
            },
          },
          createdAt: { type: Sequelize.DataTypes.DATE },
          updatedAt: { type: Sequelize.DataTypes.DATE },
          deletedAt: { type: Sequelize.DataTypes.DATE },
          importHash: {
            type: Sequelize.DataTypes.STRING(255),
            allowNull: true,
            unique: true,
          },
        },
        { transaction },
      );

      await queryInterface.createTable(
        'earnings',
        {
          id: {
            type: Sequelize.DataTypes.UUID,
            defaultValue: Sequelize.DataTypes.UUIDV4,
            primaryKey: true,
          },
          createdById: {
            type: Sequelize.DataTypes.UUID,
            references: {
              key: 'id',
              model: 'users',
            },
          },
          updatedById: {
            type: Sequelize.DataTypes.UUID,
            references: {
              key: 'id',
              model: 'users',
            },
          },
          createdAt: { type: Sequelize.DataTypes.DATE },
          updatedAt: { type: Sequelize.DataTypes.DATE },
          deletedAt: { type: Sequelize.DataTypes.DATE },
          importHash: {
            type: Sequelize.DataTypes.STRING(255),
            allowNull: true,
            unique: true,
          },
        },
        { transaction },
      );

      await queryInterface.createTable(
        'employees',
        {
          id: {
            type: Sequelize.DataTypes.UUID,
            defaultValue: Sequelize.DataTypes.UUIDV4,
            primaryKey: true,
          },
          createdById: {
            type: Sequelize.DataTypes.UUID,
            references: {
              key: 'id',
              model: 'users',
            },
          },
          updatedById: {
            type: Sequelize.DataTypes.UUID,
            references: {
              key: 'id',
              model: 'users',
            },
          },
          createdAt: { type: Sequelize.DataTypes.DATE },
          updatedAt: { type: Sequelize.DataTypes.DATE },
          deletedAt: { type: Sequelize.DataTypes.DATE },
          importHash: {
            type: Sequelize.DataTypes.STRING(255),
            allowNull: true,
            unique: true,
          },
        },
        { transaction },
      );

      await queryInterface.createTable(
        'employments',
        {
          id: {
            type: Sequelize.DataTypes.UUID,
            defaultValue: Sequelize.DataTypes.UUIDV4,
            primaryKey: true,
          },
          createdById: {
            type: Sequelize.DataTypes.UUID,
            references: {
              key: 'id',
              model: 'users',
            },
          },
          updatedById: {
            type: Sequelize.DataTypes.UUID,
            references: {
              key: 'id',
              model: 'users',
            },
          },
          createdAt: { type: Sequelize.DataTypes.DATE },
          updatedAt: { type: Sequelize.DataTypes.DATE },
          deletedAt: { type: Sequelize.DataTypes.DATE },
          importHash: {
            type: Sequelize.DataTypes.STRING(255),
            allowNull: true,
            unique: true,
          },
        },
        { transaction },
      );

      await queryInterface.createTable(
        'enrollment_learnings',
        {
          id: {
            type: Sequelize.DataTypes.UUID,
            defaultValue: Sequelize.DataTypes.UUIDV4,
            primaryKey: true,
          },
          createdById: {
            type: Sequelize.DataTypes.UUID,
            references: {
              key: 'id',
              model: 'users',
            },
          },
          updatedById: {
            type: Sequelize.DataTypes.UUID,
            references: {
              key: 'id',
              model: 'users',
            },
          },
          createdAt: { type: Sequelize.DataTypes.DATE },
          updatedAt: { type: Sequelize.DataTypes.DATE },
          deletedAt: { type: Sequelize.DataTypes.DATE },
          importHash: {
            type: Sequelize.DataTypes.STRING(255),
            allowNull: true,
            unique: true,
          },
        },
        { transaction },
      );

      await queryInterface.createTable(
        'enrollments',
        {
          id: {
            type: Sequelize.DataTypes.UUID,
            defaultValue: Sequelize.DataTypes.UUIDV4,
            primaryKey: true,
          },
          createdById: {
            type: Sequelize.DataTypes.UUID,
            references: {
              key: 'id',
              model: 'users',
            },
          },
          updatedById: {
            type: Sequelize.DataTypes.UUID,
            references: {
              key: 'id',
              model: 'users',
            },
          },
          createdAt: { type: Sequelize.DataTypes.DATE },
          updatedAt: { type: Sequelize.DataTypes.DATE },
          deletedAt: { type: Sequelize.DataTypes.DATE },
          importHash: {
            type: Sequelize.DataTypes.STRING(255),
            allowNull: true,
            unique: true,
          },
        },
        { transaction },
      );

      await queryInterface.createTable(
        'expense_lines',
        {
          id: {
            type: Sequelize.DataTypes.UUID,
            defaultValue: Sequelize.DataTypes.UUIDV4,
            primaryKey: true,
          },
          createdById: {
            type: Sequelize.DataTypes.UUID,
            references: {
              key: 'id',
              model: 'users',
            },
          },
          updatedById: {
            type: Sequelize.DataTypes.UUID,
            references: {
              key: 'id',
              model: 'users',
            },
          },
          createdAt: { type: Sequelize.DataTypes.DATE },
          updatedAt: { type: Sequelize.DataTypes.DATE },
          deletedAt: { type: Sequelize.DataTypes.DATE },
          importHash: {
            type: Sequelize.DataTypes.STRING(255),
            allowNull: true,
            unique: true,
          },
        },
        { transaction },
      );

      await queryInterface.createTable(
        'expense_reports',
        {
          id: {
            type: Sequelize.DataTypes.UUID,
            defaultValue: Sequelize.DataTypes.UUIDV4,
            primaryKey: true,
          },
          createdById: {
            type: Sequelize.DataTypes.UUID,
            references: {
              key: 'id',
              model: 'users',
            },
          },
          updatedById: {
            type: Sequelize.DataTypes.UUID,
            references: {
              key: 'id',
              model: 'users',
            },
          },
          createdAt: { type: Sequelize.DataTypes.DATE },
          updatedAt: { type: Sequelize.DataTypes.DATE },
          deletedAt: { type: Sequelize.DataTypes.DATE },
          importHash: {
            type: Sequelize.DataTypes.STRING(255),
            allowNull: true,
            unique: true,
          },
        },
        { transaction },
      );

      await queryInterface.createTable(
        'goals',
        {
          id: {
            type: Sequelize.DataTypes.UUID,
            defaultValue: Sequelize.DataTypes.UUIDV4,
            primaryKey: true,
          },
          createdById: {
            type: Sequelize.DataTypes.UUID,
            references: {
              key: 'id',
              model: 'users',
            },
          },
          updatedById: {
            type: Sequelize.DataTypes.UUID,
            references: {
              key: 'id',
              model: 'users',
            },
          },
          createdAt: { type: Sequelize.DataTypes.DATE },
          updatedAt: { type: Sequelize.DataTypes.DATE },
          deletedAt: { type: Sequelize.DataTypes.DATE },
          importHash: {
            type: Sequelize.DataTypes.STRING(255),
            allowNull: true,
            unique: true,
          },
        },
        { transaction },
      );

      await queryInterface.createTable(
        'identity_accounts',
        {
          id: {
            type: Sequelize.DataTypes.UUID,
            defaultValue: Sequelize.DataTypes.UUIDV4,
            primaryKey: true,
          },
          createdById: {
            type: Sequelize.DataTypes.UUID,
            references: {
              key: 'id',
              model: 'users',
            },
          },
          updatedById: {
            type: Sequelize.DataTypes.UUID,
            references: {
              key: 'id',
              model: 'users',
            },
          },
          createdAt: { type: Sequelize.DataTypes.DATE },
          updatedAt: { type: Sequelize.DataTypes.DATE },
          deletedAt: { type: Sequelize.DataTypes.DATE },
          importHash: {
            type: Sequelize.DataTypes.STRING(255),
            allowNull: true,
            unique: true,
          },
        },
        { transaction },
      );

      await queryInterface.createTable(
        'interviews',
        {
          id: {
            type: Sequelize.DataTypes.UUID,
            defaultValue: Sequelize.DataTypes.UUIDV4,
            primaryKey: true,
          },
          createdById: {
            type: Sequelize.DataTypes.UUID,
            references: {
              key: 'id',
              model: 'users',
            },
          },
          updatedById: {
            type: Sequelize.DataTypes.UUID,
            references: {
              key: 'id',
              model: 'users',
            },
          },
          createdAt: { type: Sequelize.DataTypes.DATE },
          updatedAt: { type: Sequelize.DataTypes.DATE },
          deletedAt: { type: Sequelize.DataTypes.DATE },
          importHash: {
            type: Sequelize.DataTypes.STRING(255),
            allowNull: true,
            unique: true,
          },
        },
        { transaction },
      );

      await queryInterface.createTable(
        'inventory_events',
        {
          id: {
            type: Sequelize.DataTypes.UUID,
            defaultValue: Sequelize.DataTypes.UUIDV4,
            primaryKey: true,
          },
          createdById: {
            type: Sequelize.DataTypes.UUID,
            references: {
              key: 'id',
              model: 'users',
            },
          },
          updatedById: {
            type: Sequelize.DataTypes.UUID,
            references: {
              key: 'id',
              model: 'users',
            },
          },
          createdAt: { type: Sequelize.DataTypes.DATE },
          updatedAt: { type: Sequelize.DataTypes.DATE },
          deletedAt: { type: Sequelize.DataTypes.DATE },
          importHash: {
            type: Sequelize.DataTypes.STRING(255),
            allowNull: true,
            unique: true,
          },
        },
        { transaction },
      );

      await queryInterface.createTable(
        'job_requisitions',
        {
          id: {
            type: Sequelize.DataTypes.UUID,
            defaultValue: Sequelize.DataTypes.UUIDV4,
            primaryKey: true,
          },
          createdById: {
            type: Sequelize.DataTypes.UUID,
            references: {
              key: 'id',
              model: 'users',
            },
          },
          updatedById: {
            type: Sequelize.DataTypes.UUID,
            references: {
              key: 'id',
              model: 'users',
            },
          },
          createdAt: { type: Sequelize.DataTypes.DATE },
          updatedAt: { type: Sequelize.DataTypes.DATE },
          deletedAt: { type: Sequelize.DataTypes.DATE },
          importHash: {
            type: Sequelize.DataTypes.STRING(255),
            allowNull: true,
            unique: true,
          },
        },
        { transaction },
      );

      await queryInterface.createTable(
        'learning_courses',
        {
          id: {
            type: Sequelize.DataTypes.UUID,
            defaultValue: Sequelize.DataTypes.UUIDV4,
            primaryKey: true,
          },
          createdById: {
            type: Sequelize.DataTypes.UUID,
            references: {
              key: 'id',
              model: 'users',
            },
          },
          updatedById: {
            type: Sequelize.DataTypes.UUID,
            references: {
              key: 'id',
              model: 'users',
            },
          },
          createdAt: { type: Sequelize.DataTypes.DATE },
          updatedAt: { type: Sequelize.DataTypes.DATE },
          deletedAt: { type: Sequelize.DataTypes.DATE },
          importHash: {
            type: Sequelize.DataTypes.STRING(255),
            allowNull: true,
            unique: true,
          },
        },
        { transaction },
      );

      await queryInterface.createTable(
        'leave_requests',
        {
          id: {
            type: Sequelize.DataTypes.UUID,
            defaultValue: Sequelize.DataTypes.UUIDV4,
            primaryKey: true,
          },
          createdById: {
            type: Sequelize.DataTypes.UUID,
            references: {
              key: 'id',
              model: 'users',
            },
          },
          updatedById: {
            type: Sequelize.DataTypes.UUID,
            references: {
              key: 'id',
              model: 'users',
            },
          },
          createdAt: { type: Sequelize.DataTypes.DATE },
          updatedAt: { type: Sequelize.DataTypes.DATE },
          deletedAt: { type: Sequelize.DataTypes.DATE },
          importHash: {
            type: Sequelize.DataTypes.STRING(255),
            allowNull: true,
            unique: true,
          },
        },
        { transaction },
      );

      await queryInterface.createTable(
        'offers',
        {
          id: {
            type: Sequelize.DataTypes.UUID,
            defaultValue: Sequelize.DataTypes.UUIDV4,
            primaryKey: true,
          },
          createdById: {
            type: Sequelize.DataTypes.UUID,
            references: {
              key: 'id',
              model: 'users',
            },
          },
          updatedById: {
            type: Sequelize.DataTypes.UUID,
            references: {
              key: 'id',
              model: 'users',
            },
          },
          createdAt: { type: Sequelize.DataTypes.DATE },
          updatedAt: { type: Sequelize.DataTypes.DATE },
          deletedAt: { type: Sequelize.DataTypes.DATE },
          importHash: {
            type: Sequelize.DataTypes.STRING(255),
            allowNull: true,
            unique: true,
          },
        },
        { transaction },
      );

      await queryInterface.createTable(
        'payments',
        {
          id: {
            type: Sequelize.DataTypes.UUID,
            defaultValue: Sequelize.DataTypes.UUIDV4,
            primaryKey: true,
          },
          createdById: {
            type: Sequelize.DataTypes.UUID,
            references: {
              key: 'id',
              model: 'users',
            },
          },
          updatedById: {
            type: Sequelize.DataTypes.UUID,
            references: {
              key: 'id',
              model: 'users',
            },
          },
          createdAt: { type: Sequelize.DataTypes.DATE },
          updatedAt: { type: Sequelize.DataTypes.DATE },
          deletedAt: { type: Sequelize.DataTypes.DATE },
          importHash: {
            type: Sequelize.DataTypes.STRING(255),
            allowNull: true,
            unique: true,
          },
        },
        { transaction },
      );

      await queryInterface.createTable(
        'payroll_runs',
        {
          id: {
            type: Sequelize.DataTypes.UUID,
            defaultValue: Sequelize.DataTypes.UUIDV4,
            primaryKey: true,
          },
          createdById: {
            type: Sequelize.DataTypes.UUID,
            references: {
              key: 'id',
              model: 'users',
            },
          },
          updatedById: {
            type: Sequelize.DataTypes.UUID,
            references: {
              key: 'id',
              model: 'users',
            },
          },
          createdAt: { type: Sequelize.DataTypes.DATE },
          updatedAt: { type: Sequelize.DataTypes.DATE },
          deletedAt: { type: Sequelize.DataTypes.DATE },
          importHash: {
            type: Sequelize.DataTypes.STRING(255),
            allowNull: true,
            unique: true,
          },
        },
        { transaction },
      );

      await queryInterface.createTable(
        'policies',
        {
          id: {
            type: Sequelize.DataTypes.UUID,
            defaultValue: Sequelize.DataTypes.UUIDV4,
            primaryKey: true,
          },
          createdById: {
            type: Sequelize.DataTypes.UUID,
            references: {
              key: 'id',
              model: 'users',
            },
          },
          updatedById: {
            type: Sequelize.DataTypes.UUID,
            references: {
              key: 'id',
              model: 'users',
            },
          },
          createdAt: { type: Sequelize.DataTypes.DATE },
          updatedAt: { type: Sequelize.DataTypes.DATE },
          deletedAt: { type: Sequelize.DataTypes.DATE },
          importHash: {
            type: Sequelize.DataTypes.STRING(255),
            allowNull: true,
            unique: true,
          },
        },
        { transaction },
      );

      await queryInterface.createTable(
        'positions',
        {
          id: {
            type: Sequelize.DataTypes.UUID,
            defaultValue: Sequelize.DataTypes.UUIDV4,
            primaryKey: true,
          },
          createdById: {
            type: Sequelize.DataTypes.UUID,
            references: {
              key: 'id',
              model: 'users',
            },
          },
          updatedById: {
            type: Sequelize.DataTypes.UUID,
            references: {
              key: 'id',
              model: 'users',
            },
          },
          createdAt: { type: Sequelize.DataTypes.DATE },
          updatedAt: { type: Sequelize.DataTypes.DATE },
          deletedAt: { type: Sequelize.DataTypes.DATE },
          importHash: {
            type: Sequelize.DataTypes.STRING(255),
            allowNull: true,
            unique: true,
          },
        },
        { transaction },
      );

      await queryInterface.createTable(
        'review_cycles',
        {
          id: {
            type: Sequelize.DataTypes.UUID,
            defaultValue: Sequelize.DataTypes.UUIDV4,
            primaryKey: true,
          },
          createdById: {
            type: Sequelize.DataTypes.UUID,
            references: {
              key: 'id',
              model: 'users',
            },
          },
          updatedById: {
            type: Sequelize.DataTypes.UUID,
            references: {
              key: 'id',
              model: 'users',
            },
          },
          createdAt: { type: Sequelize.DataTypes.DATE },
          updatedAt: { type: Sequelize.DataTypes.DATE },
          deletedAt: { type: Sequelize.DataTypes.DATE },
          importHash: {
            type: Sequelize.DataTypes.STRING(255),
            allowNull: true,
            unique: true,
          },
        },
        { transaction },
      );

      await queryInterface.createTable(
        'reviews',
        {
          id: {
            type: Sequelize.DataTypes.UUID,
            defaultValue: Sequelize.DataTypes.UUIDV4,
            primaryKey: true,
          },
          createdById: {
            type: Sequelize.DataTypes.UUID,
            references: {
              key: 'id',
              model: 'users',
            },
          },
          updatedById: {
            type: Sequelize.DataTypes.UUID,
            references: {
              key: 'id',
              model: 'users',
            },
          },
          createdAt: { type: Sequelize.DataTypes.DATE },
          updatedAt: { type: Sequelize.DataTypes.DATE },
          deletedAt: { type: Sequelize.DataTypes.DATE },
          importHash: {
            type: Sequelize.DataTypes.STRING(255),
            allowNull: true,
            unique: true,
          },
        },
        { transaction },
      );

      await queryInterface.createTable(
        'schedule_shifts',
        {
          id: {
            type: Sequelize.DataTypes.UUID,
            defaultValue: Sequelize.DataTypes.UUIDV4,
            primaryKey: true,
          },
          createdById: {
            type: Sequelize.DataTypes.UUID,
            references: {
              key: 'id',
              model: 'users',
            },
          },
          updatedById: {
            type: Sequelize.DataTypes.UUID,
            references: {
              key: 'id',
              model: 'users',
            },
          },
          createdAt: { type: Sequelize.DataTypes.DATE },
          updatedAt: { type: Sequelize.DataTypes.DATE },
          deletedAt: { type: Sequelize.DataTypes.DATE },
          importHash: {
            type: Sequelize.DataTypes.STRING(255),
            allowNull: true,
            unique: true,
          },
        },
        { transaction },
      );

      await queryInterface.createTable(
        'taxes',
        {
          id: {
            type: Sequelize.DataTypes.UUID,
            defaultValue: Sequelize.DataTypes.UUIDV4,
            primaryKey: true,
          },
          createdById: {
            type: Sequelize.DataTypes.UUID,
            references: {
              key: 'id',
              model: 'users',
            },
          },
          updatedById: {
            type: Sequelize.DataTypes.UUID,
            references: {
              key: 'id',
              model: 'users',
            },
          },
          createdAt: { type: Sequelize.DataTypes.DATE },
          updatedAt: { type: Sequelize.DataTypes.DATE },
          deletedAt: { type: Sequelize.DataTypes.DATE },
          importHash: {
            type: Sequelize.DataTypes.STRING(255),
            allowNull: true,
            unique: true,
          },
        },
        { transaction },
      );

      await queryInterface.createTable(
        'time_entries',
        {
          id: {
            type: Sequelize.DataTypes.UUID,
            defaultValue: Sequelize.DataTypes.UUIDV4,
            primaryKey: true,
          },
          createdById: {
            type: Sequelize.DataTypes.UUID,
            references: {
              key: 'id',
              model: 'users',
            },
          },
          updatedById: {
            type: Sequelize.DataTypes.UUID,
            references: {
              key: 'id',
              model: 'users',
            },
          },
          createdAt: { type: Sequelize.DataTypes.DATE },
          updatedAt: { type: Sequelize.DataTypes.DATE },
          deletedAt: { type: Sequelize.DataTypes.DATE },
          importHash: {
            type: Sequelize.DataTypes.STRING(255),
            allowNull: true,
            unique: true,
          },
        },
        { transaction },
      );

      await queryInterface.createTable(
        'timecards',
        {
          id: {
            type: Sequelize.DataTypes.UUID,
            defaultValue: Sequelize.DataTypes.UUIDV4,
            primaryKey: true,
          },
          createdById: {
            type: Sequelize.DataTypes.UUID,
            references: {
              key: 'id',
              model: 'users',
            },
          },
          updatedById: {
            type: Sequelize.DataTypes.UUID,
            references: {
              key: 'id',
              model: 'users',
            },
          },
          createdAt: { type: Sequelize.DataTypes.DATE },
          updatedAt: { type: Sequelize.DataTypes.DATE },
          deletedAt: { type: Sequelize.DataTypes.DATE },
          importHash: {
            type: Sequelize.DataTypes.STRING(255),
            allowNull: true,
            unique: true,
          },
        },
        { transaction },
      );

      await queryInterface.createTable(
        'travel_bookings',
        {
          id: {
            type: Sequelize.DataTypes.UUID,
            defaultValue: Sequelize.DataTypes.UUIDV4,
            primaryKey: true,
          },
          createdById: {
            type: Sequelize.DataTypes.UUID,
            references: {
              key: 'id',
              model: 'users',
            },
          },
          updatedById: {
            type: Sequelize.DataTypes.UUID,
            references: {
              key: 'id',
              model: 'users',
            },
          },
          createdAt: { type: Sequelize.DataTypes.DATE },
          updatedAt: { type: Sequelize.DataTypes.DATE },
          deletedAt: { type: Sequelize.DataTypes.DATE },
          importHash: {
            type: Sequelize.DataTypes.STRING(255),
            allowNull: true,
            unique: true,
          },
        },
        { transaction },
      );

      await queryInterface.createTable(
        'vendors',
        {
          id: {
            type: Sequelize.DataTypes.UUID,
            defaultValue: Sequelize.DataTypes.UUIDV4,
            primaryKey: true,
          },
          createdById: {
            type: Sequelize.DataTypes.UUID,
            references: {
              key: 'id',
              model: 'users',
            },
          },
          updatedById: {
            type: Sequelize.DataTypes.UUID,
            references: {
              key: 'id',
              model: 'users',
            },
          },
          createdAt: { type: Sequelize.DataTypes.DATE },
          updatedAt: { type: Sequelize.DataTypes.DATE },
          deletedAt: { type: Sequelize.DataTypes.DATE },
          importHash: {
            type: Sequelize.DataTypes.STRING(255),
            allowNull: true,
            unique: true,
          },
        },
        { transaction },
      );

      await queryInterface.createTable(
        'roles',
        {
          id: {
            type: Sequelize.DataTypes.UUID,
            defaultValue: Sequelize.DataTypes.UUIDV4,
            primaryKey: true,
          },
          createdById: {
            type: Sequelize.DataTypes.UUID,
            references: {
              key: 'id',
              model: 'users',
            },
          },
          updatedById: {
            type: Sequelize.DataTypes.UUID,
            references: {
              key: 'id',
              model: 'users',
            },
          },
          createdAt: { type: Sequelize.DataTypes.DATE },
          updatedAt: { type: Sequelize.DataTypes.DATE },
          deletedAt: { type: Sequelize.DataTypes.DATE },
          importHash: {
            type: Sequelize.DataTypes.STRING(255),
            allowNull: true,
            unique: true,
          },
        },
        { transaction },
      );

      await queryInterface.createTable(
        'permissions',
        {
          id: {
            type: Sequelize.DataTypes.UUID,
            defaultValue: Sequelize.DataTypes.UUIDV4,
            primaryKey: true,
          },
          createdById: {
            type: Sequelize.DataTypes.UUID,
            references: {
              key: 'id',
              model: 'users',
            },
          },
          updatedById: {
            type: Sequelize.DataTypes.UUID,
            references: {
              key: 'id',
              model: 'users',
            },
          },
          createdAt: { type: Sequelize.DataTypes.DATE },
          updatedAt: { type: Sequelize.DataTypes.DATE },
          deletedAt: { type: Sequelize.DataTypes.DATE },
          importHash: {
            type: Sequelize.DataTypes.STRING(255),
            allowNull: true,
            unique: true,
          },
        },
        { transaction },
      );

      await queryInterface.createTable(
        'organizations',
        {
          id: {
            type: Sequelize.DataTypes.UUID,
            defaultValue: Sequelize.DataTypes.UUIDV4,
            primaryKey: true,
          },
          createdById: {
            type: Sequelize.DataTypes.UUID,
            references: {
              key: 'id',
              model: 'users',
            },
          },
          updatedById: {
            type: Sequelize.DataTypes.UUID,
            references: {
              key: 'id',
              model: 'users',
            },
          },
          createdAt: { type: Sequelize.DataTypes.DATE },
          updatedAt: { type: Sequelize.DataTypes.DATE },
          deletedAt: { type: Sequelize.DataTypes.DATE },
          importHash: {
            type: Sequelize.DataTypes.STRING(255),
            allowNull: true,
            unique: true,
          },
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'users',
        'firstName',
        {
          type: Sequelize.DataTypes.TEXT,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'users',
        'lastName',
        {
          type: Sequelize.DataTypes.TEXT,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'users',
        'phoneNumber',
        {
          type: Sequelize.DataTypes.TEXT,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'users',
        'email',
        {
          type: Sequelize.DataTypes.TEXT,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'users',
        'disabled',
        {
          type: Sequelize.DataTypes.BOOLEAN,

          defaultValue: false,
          allowNull: false,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'users',
        'password',
        {
          type: Sequelize.DataTypes.TEXT,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'users',
        'emailVerified',
        {
          type: Sequelize.DataTypes.BOOLEAN,

          defaultValue: false,
          allowNull: false,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'users',
        'emailVerificationToken',
        {
          type: Sequelize.DataTypes.TEXT,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'users',
        'emailVerificationTokenExpiresAt',
        {
          type: Sequelize.DataTypes.DATE,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'users',
        'passwordResetToken',
        {
          type: Sequelize.DataTypes.TEXT,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'users',
        'passwordResetTokenExpiresAt',
        {
          type: Sequelize.DataTypes.DATE,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'users',
        'provider',
        {
          type: Sequelize.DataTypes.TEXT,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'app_accounts',
        'employeeId',
        {
          type: Sequelize.DataTypes.UUID,

          references: {
            model: 'employees',
            key: 'id',
          },
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'app_accounts',
        'role',
        {
          type: Sequelize.DataTypes.ENUM,

          values: ['User', 'Admin', 'SuperAdmin'],
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'app_accounts',
        'status',
        {
          type: Sequelize.DataTypes.ENUM,

          values: ['Active', 'Inactive'],
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'applications',
        'candidateId',
        {
          type: Sequelize.DataTypes.UUID,

          references: {
            model: 'candidates',
            key: 'id',
          },
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'applications',
        'requisitionId',
        {
          type: Sequelize.DataTypes.UUID,

          references: {
            model: 'job_requisitions',
            key: 'id',
          },
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'applications',
        'submitted_at',
        {
          type: Sequelize.DataTypes.DATE,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'applications',
        'status',
        {
          type: Sequelize.DataTypes.ENUM,

          values: ['Pending', 'Reviewed', 'Rejected'],
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'approvals',
        'object_type',
        {
          type: Sequelize.DataTypes.TEXT,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'approvals',
        'object_id',
        {
          type: Sequelize.DataTypes.INTEGER,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'approvals',
        'approverId',
        {
          type: Sequelize.DataTypes.UUID,

          references: {
            model: 'employees',
            key: 'id',
          },
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'approvals',
        'step',
        {
          type: Sequelize.DataTypes.INTEGER,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'approvals',
        'status',
        {
          type: Sequelize.DataTypes.ENUM,

          values: ['Pending', 'Approved', 'Rejected'],
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'approvals',
        'timestamp',
        {
          type: Sequelize.DataTypes.DATE,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'audit_logs',
        'actor',
        {
          type: Sequelize.DataTypes.TEXT,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'audit_logs',
        'action',
        {
          type: Sequelize.DataTypes.TEXT,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'audit_logs',
        'object_type',
        {
          type: Sequelize.DataTypes.TEXT,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'audit_logs',
        'object_id',
        {
          type: Sequelize.DataTypes.INTEGER,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'audit_logs',
        'timestamp',
        {
          type: Sequelize.DataTypes.DATE,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'audit_logs',
        'diff',
        {
          type: Sequelize.DataTypes.TEXT,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'benefit_plans',
        'carrier',
        {
          type: Sequelize.DataTypes.TEXT,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'benefit_plans',
        'plan_type',
        {
          type: Sequelize.DataTypes.ENUM,

          values: ['Medical', 'Dental', 'Vision'],
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'benefit_plans',
        'country',
        {
          type: Sequelize.DataTypes.TEXT,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'benefit_plans',
        'currency',
        {
          type: Sequelize.DataTypes.TEXT,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'bills',
        'vendorId',
        {
          type: Sequelize.DataTypes.UUID,

          references: {
            model: 'vendors',
            key: 'id',
          },
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'bills',
        'invoice_no',
        {
          type: Sequelize.DataTypes.TEXT,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'bills',
        'invoice_date',
        {
          type: Sequelize.DataTypes.DATE,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'bills',
        'due_date',
        {
          type: Sequelize.DataTypes.DATE,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'bills',
        'amount',
        {
          type: Sequelize.DataTypes.DECIMAL,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'bills',
        'currency',
        {
          type: Sequelize.DataTypes.TEXT,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'bills',
        'category',
        {
          type: Sequelize.DataTypes.TEXT,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'bills',
        'status',
        {
          type: Sequelize.DataTypes.ENUM,

          values: ['Pending', 'Paid', 'Overdue'],
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'candidates',
        'name',
        {
          type: Sequelize.DataTypes.TEXT,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'candidates',
        'email',
        {
          type: Sequelize.DataTypes.TEXT,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'candidates',
        'phone',
        {
          type: Sequelize.DataTypes.TEXT,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'candidates',
        'source',
        {
          type: Sequelize.DataTypes.TEXT,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'candidates',
        'current_stage',
        {
          type: Sequelize.DataTypes.ENUM,

          values: ['Applied', 'Interviewing', 'Offered', 'Hired'],
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'cards',
        'employeeId',
        {
          type: Sequelize.DataTypes.UUID,

          references: {
            model: 'employees',
            key: 'id',
          },
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'cards',
        'type',
        {
          type: Sequelize.DataTypes.ENUM,

          values: ['Virtual', 'Physical'],
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'cards',
        'last4',
        {
          type: Sequelize.DataTypes.TEXT,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'cards',
        'limit',
        {
          type: Sequelize.DataTypes.DECIMAL,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'cards',
        'status',
        {
          type: Sequelize.DataTypes.ENUM,

          values: ['Active', 'Inactive'],
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'compensations',
        'employeeId',
        {
          type: Sequelize.DataTypes.UUID,

          references: {
            model: 'employees',
            key: 'id',
          },
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'compensations',
        'base_pay',
        {
          type: Sequelize.DataTypes.DECIMAL,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'compensations',
        'pay_type',
        {
          type: Sequelize.DataTypes.ENUM,

          values: ['Hourly', 'Salary'],
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'compensations',
        'pay_frequency',
        {
          type: Sequelize.DataTypes.ENUM,

          values: ['Weekly', 'Bi-weekly', 'Monthly'],
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'compensations',
        'currency',
        {
          type: Sequelize.DataTypes.TEXT,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'compensations',
        'effective_date',
        {
          type: Sequelize.DataTypes.DATE,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'deductions',
        'payroll_runId',
        {
          type: Sequelize.DataTypes.UUID,

          references: {
            model: 'payroll_runs',
            key: 'id',
          },
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'deductions',
        'employeeId',
        {
          type: Sequelize.DataTypes.UUID,

          references: {
            model: 'employees',
            key: 'id',
          },
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'deductions',
        'type',
        {
          type: Sequelize.DataTypes.ENUM,

          values: ['Tax', 'Insurance', 'Other'],
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'deductions',
        'amount',
        {
          type: Sequelize.DataTypes.DECIMAL,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'devices',
        'type',
        {
          type: Sequelize.DataTypes.ENUM,

          values: ['Laptop', 'Desktop', 'Tablet'],
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'devices',
        'platform',
        {
          type: Sequelize.DataTypes.ENUM,

          values: ['Windows', 'MacOS', 'Linux'],
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'devices',
        'serial',
        {
          type: Sequelize.DataTypes.TEXT,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'devices',
        'asset_tag',
        {
          type: Sequelize.DataTypes.TEXT,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'devices',
        'ownerId',
        {
          type: Sequelize.DataTypes.UUID,

          references: {
            model: 'employees',
            key: 'id',
          },
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'devices',
        'status',
        {
          type: Sequelize.DataTypes.ENUM,

          values: ['Assigned', 'InStock', 'Retired'],
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'devices',
        'encryption',
        {
          type: Sequelize.DataTypes.BOOLEAN,

          defaultValue: false,
          allowNull: false,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'devices',
        'os_version',
        {
          type: Sequelize.DataTypes.TEXT,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'documents',
        'ownerId',
        {
          type: Sequelize.DataTypes.UUID,

          references: {
            model: 'employees',
            key: 'id',
          },
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'documents',
        'doc_type',
        {
          type: Sequelize.DataTypes.ENUM,

          values: ['Contract', 'ID', 'Certificate'],
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'documents',
        'country',
        {
          type: Sequelize.DataTypes.TEXT,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'documents',
        'status',
        {
          type: Sequelize.DataTypes.ENUM,

          values: ['Pending', 'Signed', 'Expired'],
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'documents',
        'signed_at',
        {
          type: Sequelize.DataTypes.DATE,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'earnings',
        'payroll_runId',
        {
          type: Sequelize.DataTypes.UUID,

          references: {
            model: 'payroll_runs',
            key: 'id',
          },
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'earnings',
        'employeeId',
        {
          type: Sequelize.DataTypes.UUID,

          references: {
            model: 'employees',
            key: 'id',
          },
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'earnings',
        'component',
        {
          type: Sequelize.DataTypes.TEXT,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'earnings',
        'units',
        {
          type: Sequelize.DataTypes.DECIMAL,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'earnings',
        'rate',
        {
          type: Sequelize.DataTypes.DECIMAL,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'earnings',
        'amount',
        {
          type: Sequelize.DataTypes.DECIMAL,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'earnings',
        'currency',
        {
          type: Sequelize.DataTypes.TEXT,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'earnings',
        'taxable',
        {
          type: Sequelize.DataTypes.BOOLEAN,

          defaultValue: false,
          allowNull: false,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'employees',
        'userId',
        {
          type: Sequelize.DataTypes.UUID,

          references: {
            model: 'users',
            key: 'id',
          },
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'employments',
        'employeeId',
        {
          type: Sequelize.DataTypes.UUID,

          references: {
            model: 'employees',
            key: 'id',
          },
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'employments',
        'employment_type',
        {
          type: Sequelize.DataTypes.ENUM,

          values: ['Full-time', 'Part-time', 'Contractor'],
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'employments',
        'start_date',
        {
          type: Sequelize.DataTypes.DATE,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'employments',
        'end_date',
        {
          type: Sequelize.DataTypes.DATE,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'employments',
        'fte',
        {
          type: Sequelize.DataTypes.DECIMAL,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'employments',
        'status',
        {
          type: Sequelize.DataTypes.ENUM,

          values: ['Active', 'Inactive', 'Terminated'],
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'enrollment_learnings',
        'employeeId',
        {
          type: Sequelize.DataTypes.UUID,

          references: {
            model: 'employees',
            key: 'id',
          },
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'enrollment_learnings',
        'courseId',
        {
          type: Sequelize.DataTypes.UUID,

          references: {
            model: 'learning_courses',
            key: 'id',
          },
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'enrollment_learnings',
        'assigned_byId',
        {
          type: Sequelize.DataTypes.UUID,

          references: {
            model: 'employees',
            key: 'id',
          },
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'enrollment_learnings',
        'due_date',
        {
          type: Sequelize.DataTypes.DATE,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'enrollment_learnings',
        'status',
        {
          type: Sequelize.DataTypes.ENUM,

          values: ['Assigned', 'Completed', 'Overdue'],
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'enrollments',
        'employeeId',
        {
          type: Sequelize.DataTypes.UUID,

          references: {
            model: 'employees',
            key: 'id',
          },
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'enrollments',
        'planId',
        {
          type: Sequelize.DataTypes.UUID,

          references: {
            model: 'benefit_plans',
            key: 'id',
          },
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'enrollments',
        'effective_date',
        {
          type: Sequelize.DataTypes.DATE,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'enrollments',
        'premium_employee',
        {
          type: Sequelize.DataTypes.DECIMAL,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'enrollments',
        'premium_employer',
        {
          type: Sequelize.DataTypes.DECIMAL,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'enrollments',
        'status',
        {
          type: Sequelize.DataTypes.ENUM,

          values: ['Active', 'Inactive'],
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'expense_lines',
        'reportId',
        {
          type: Sequelize.DataTypes.UUID,

          references: {
            model: 'expense_reports',
            key: 'id',
          },
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'expense_lines',
        'date',
        {
          type: Sequelize.DataTypes.DATE,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'expense_lines',
        'merchant',
        {
          type: Sequelize.DataTypes.TEXT,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'expense_lines',
        'amount',
        {
          type: Sequelize.DataTypes.DECIMAL,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'expense_lines',
        'currency',
        {
          type: Sequelize.DataTypes.TEXT,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'expense_lines',
        'category',
        {
          type: Sequelize.DataTypes.TEXT,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'expense_reports',
        'employeeId',
        {
          type: Sequelize.DataTypes.UUID,

          references: {
            model: 'employees',
            key: 'id',
          },
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'expense_reports',
        'submitted_at',
        {
          type: Sequelize.DataTypes.DATE,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'expense_reports',
        'status',
        {
          type: Sequelize.DataTypes.ENUM,

          values: ['Pending', 'Approved', 'Rejected'],
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'expense_reports',
        'policy_result',
        {
          type: Sequelize.DataTypes.TEXT,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'goals',
        'employeeId',
        {
          type: Sequelize.DataTypes.UUID,

          references: {
            model: 'employees',
            key: 'id',
          },
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'goals',
        'type',
        {
          type: Sequelize.DataTypes.ENUM,

          values: ['Personal', 'Team', 'Company'],
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'goals',
        'title',
        {
          type: Sequelize.DataTypes.TEXT,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'goals',
        'metric',
        {
          type: Sequelize.DataTypes.TEXT,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'goals',
        'target',
        {
          type: Sequelize.DataTypes.DECIMAL,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'goals',
        'start',
        {
          type: Sequelize.DataTypes.DATE,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'goals',
        'due',
        {
          type: Sequelize.DataTypes.DATE,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'goals',
        'progress',
        {
          type: Sequelize.DataTypes.DECIMAL,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'identity_accounts',
        'employeeId',
        {
          type: Sequelize.DataTypes.UUID,

          references: {
            model: 'employees',
            key: 'id',
          },
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'identity_accounts',
        'idp',
        {
          type: Sequelize.DataTypes.TEXT,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'identity_accounts',
        'username',
        {
          type: Sequelize.DataTypes.TEXT,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'interviews',
        'applicationId',
        {
          type: Sequelize.DataTypes.UUID,

          references: {
            model: 'applications',
            key: 'id',
          },
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'interviews',
        'interviewerId',
        {
          type: Sequelize.DataTypes.UUID,

          references: {
            model: 'employees',
            key: 'id',
          },
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'interviews',
        'type',
        {
          type: Sequelize.DataTypes.ENUM,

          values: ['Phone', 'Onsite', 'Virtual'],
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'interviews',
        'scheduled_at',
        {
          type: Sequelize.DataTypes.DATE,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'interviews',
        'rating',
        {
          type: Sequelize.DataTypes.DECIMAL,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'interviews',
        'notes',
        {
          type: Sequelize.DataTypes.TEXT,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'inventory_events',
        'deviceId',
        {
          type: Sequelize.DataTypes.UUID,

          references: {
            model: 'devices',
            key: 'id',
          },
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'inventory_events',
        'event_type',
        {
          type: Sequelize.DataTypes.ENUM,

          values: ['Assigned', 'Returned', 'Repaired'],
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'inventory_events',
        'timestamp',
        {
          type: Sequelize.DataTypes.DATE,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'inventory_events',
        'metadata',
        {
          type: Sequelize.DataTypes.TEXT,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'job_requisitions',
        'title',
        {
          type: Sequelize.DataTypes.TEXT,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'job_requisitions',
        'employment_type',
        {
          type: Sequelize.DataTypes.ENUM,

          values: ['Full-time', 'Part-time', 'Contractor'],
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'job_requisitions',
        'openings',
        {
          type: Sequelize.DataTypes.INTEGER,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'job_requisitions',
        'status',
        {
          type: Sequelize.DataTypes.ENUM,

          values: ['Open', 'Closed', 'OnHold'],
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'job_requisitions',
        'recruiterId',
        {
          type: Sequelize.DataTypes.UUID,

          references: {
            model: 'employees',
            key: 'id',
          },
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'learning_courses',
        'title',
        {
          type: Sequelize.DataTypes.TEXT,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'learning_courses',
        'provider',
        {
          type: Sequelize.DataTypes.TEXT,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'learning_courses',
        'hours',
        {
          type: Sequelize.DataTypes.DECIMAL,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'learning_courses',
        'compliance_tag',
        {
          type: Sequelize.DataTypes.TEXT,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'leave_requests',
        'employeeId',
        {
          type: Sequelize.DataTypes.UUID,

          references: {
            model: 'employees',
            key: 'id',
          },
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'leave_requests',
        'type',
        {
          type: Sequelize.DataTypes.ENUM,

          values: ['Sick', 'Vacation', 'Unpaid'],
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'leave_requests',
        'start',
        {
          type: Sequelize.DataTypes.DATE,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'leave_requests',
        'end',
        {
          type: Sequelize.DataTypes.DATE,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'leave_requests',
        'hours',
        {
          type: Sequelize.DataTypes.DECIMAL,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'leave_requests',
        'status',
        {
          type: Sequelize.DataTypes.ENUM,

          values: ['Pending', 'Approved', 'Rejected'],
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'offers',
        'applicationId',
        {
          type: Sequelize.DataTypes.UUID,

          references: {
            model: 'applications',
            key: 'id',
          },
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'offers',
        'comp_package',
        {
          type: Sequelize.DataTypes.TEXT,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'offers',
        'target_start_date',
        {
          type: Sequelize.DataTypes.DATE,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'offers',
        'status',
        {
          type: Sequelize.DataTypes.ENUM,

          values: ['Draft', 'Sent', 'Accepted', 'Declined'],
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'payments',
        'billId',
        {
          type: Sequelize.DataTypes.UUID,

          references: {
            model: 'bills',
            key: 'id',
          },
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'payments',
        'method',
        {
          type: Sequelize.DataTypes.ENUM,

          values: ['BankTransfer', 'CreditCard', 'Cash'],
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'payments',
        'paid_at',
        {
          type: Sequelize.DataTypes.DATE,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'payments',
        'amount',
        {
          type: Sequelize.DataTypes.DECIMAL,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'payroll_runs',
        'country',
        {
          type: Sequelize.DataTypes.TEXT,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'payroll_runs',
        'pay_period_start',
        {
          type: Sequelize.DataTypes.DATE,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'payroll_runs',
        'pay_period_end',
        {
          type: Sequelize.DataTypes.DATE,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'payroll_runs',
        'pay_date',
        {
          type: Sequelize.DataTypes.DATE,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'payroll_runs',
        'status',
        {
          type: Sequelize.DataTypes.ENUM,

          values: ['Open', 'Processed', 'Amended'],
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'policies',
        'scope',
        {
          type: Sequelize.DataTypes.TEXT,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'policies',
        'rule_logic',
        {
          type: Sequelize.DataTypes.TEXT,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'policies',
        'effect',
        {
          type: Sequelize.DataTypes.ENUM,

          values: ['Allow', 'Deny'],
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'positions',
        'title',
        {
          type: Sequelize.DataTypes.TEXT,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'positions',
        'job_family',
        {
          type: Sequelize.DataTypes.TEXT,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'positions',
        'level',
        {
          type: Sequelize.DataTypes.TEXT,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'positions',
        'managerId',
        {
          type: Sequelize.DataTypes.UUID,

          references: {
            model: 'employees',
            key: 'id',
          },
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'review_cycles',
        'name',
        {
          type: Sequelize.DataTypes.TEXT,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'review_cycles',
        'cycle_start',
        {
          type: Sequelize.DataTypes.DATE,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'review_cycles',
        'cycle_end',
        {
          type: Sequelize.DataTypes.DATE,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'review_cycles',
        'status',
        {
          type: Sequelize.DataTypes.ENUM,

          values: ['Open', 'Closed'],
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'reviews',
        'review_cycleId',
        {
          type: Sequelize.DataTypes.UUID,

          references: {
            model: 'review_cycles',
            key: 'id',
          },
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'reviews',
        'employeeId',
        {
          type: Sequelize.DataTypes.UUID,

          references: {
            model: 'employees',
            key: 'id',
          },
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'reviews',
        'reviewerId',
        {
          type: Sequelize.DataTypes.UUID,

          references: {
            model: 'employees',
            key: 'id',
          },
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'reviews',
        'comments',
        {
          type: Sequelize.DataTypes.TEXT,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'schedule_shifts',
        'employeeId',
        {
          type: Sequelize.DataTypes.UUID,

          references: {
            model: 'employees',
            key: 'id',
          },
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'schedule_shifts',
        'date',
        {
          type: Sequelize.DataTypes.DATE,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'schedule_shifts',
        'start',
        {
          type: Sequelize.DataTypes.DATE,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'schedule_shifts',
        'end',
        {
          type: Sequelize.DataTypes.DATE,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'schedule_shifts',
        'role',
        {
          type: Sequelize.DataTypes.TEXT,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'taxes',
        'payroll_runId',
        {
          type: Sequelize.DataTypes.UUID,

          references: {
            model: 'payroll_runs',
            key: 'id',
          },
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'taxes',
        'employeeId',
        {
          type: Sequelize.DataTypes.UUID,

          references: {
            model: 'employees',
            key: 'id',
          },
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'taxes',
        'jurisdiction',
        {
          type: Sequelize.DataTypes.TEXT,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'taxes',
        'amount',
        {
          type: Sequelize.DataTypes.DECIMAL,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'time_entries',
        'timecardId',
        {
          type: Sequelize.DataTypes.UUID,

          references: {
            model: 'timecards',
            key: 'id',
          },
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'time_entries',
        'date',
        {
          type: Sequelize.DataTypes.DATE,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'time_entries',
        'start',
        {
          type: Sequelize.DataTypes.DATE,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'time_entries',
        'end',
        {
          type: Sequelize.DataTypes.DATE,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'time_entries',
        'break_minutes',
        {
          type: Sequelize.DataTypes.INTEGER,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'time_entries',
        'job_code',
        {
          type: Sequelize.DataTypes.TEXT,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'timecards',
        'employeeId',
        {
          type: Sequelize.DataTypes.UUID,

          references: {
            model: 'employees',
            key: 'id',
          },
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'timecards',
        'period',
        {
          type: Sequelize.DataTypes.TEXT,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'timecards',
        'status',
        {
          type: Sequelize.DataTypes.ENUM,

          values: ['Pending', 'Approved', 'Rejected'],
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'travel_bookings',
        'employeeId',
        {
          type: Sequelize.DataTypes.UUID,

          references: {
            model: 'employees',
            key: 'id',
          },
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'travel_bookings',
        'type',
        {
          type: Sequelize.DataTypes.ENUM,

          values: ['Flight', 'Hotel', 'CarRental'],
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'travel_bookings',
        'provider',
        {
          type: Sequelize.DataTypes.TEXT,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'travel_bookings',
        'start',
        {
          type: Sequelize.DataTypes.DATE,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'travel_bookings',
        'end',
        {
          type: Sequelize.DataTypes.DATE,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'travel_bookings',
        'cost',
        {
          type: Sequelize.DataTypes.DECIMAL,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'travel_bookings',
        'policy_result',
        {
          type: Sequelize.DataTypes.TEXT,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'vendors',
        'name',
        {
          type: Sequelize.DataTypes.TEXT,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'vendors',
        'tax_id',
        {
          type: Sequelize.DataTypes.TEXT,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'vendors',
        'country',
        {
          type: Sequelize.DataTypes.TEXT,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'vendors',
        'currency',
        {
          type: Sequelize.DataTypes.TEXT,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'permissions',
        'name',
        {
          type: Sequelize.DataTypes.TEXT,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'roles',
        'name',
        {
          type: Sequelize.DataTypes.TEXT,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'roles',
        'role_customization',
        {
          type: Sequelize.DataTypes.TEXT,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'users',
        'app_roleId',
        {
          type: Sequelize.DataTypes.UUID,

          references: {
            model: 'roles',
            key: 'id',
          },
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'organizations',
        'name',
        {
          type: Sequelize.DataTypes.TEXT,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'roles',
        'globalAccess',
        {
          type: Sequelize.DataTypes.BOOLEAN,

          defaultValue: false,
          allowNull: false,
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'users',
        'organizationsId',
        {
          type: Sequelize.DataTypes.UUID,

          references: {
            model: 'organizations',
            key: 'id',
          },
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'app_accounts',
        'organizationsId',
        {
          type: Sequelize.DataTypes.UUID,

          references: {
            model: 'organizations',
            key: 'id',
          },
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'applications',
        'organizationsId',
        {
          type: Sequelize.DataTypes.UUID,

          references: {
            model: 'organizations',
            key: 'id',
          },
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'approvals',
        'organizationsId',
        {
          type: Sequelize.DataTypes.UUID,

          references: {
            model: 'organizations',
            key: 'id',
          },
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'audit_logs',
        'organizationsId',
        {
          type: Sequelize.DataTypes.UUID,

          references: {
            model: 'organizations',
            key: 'id',
          },
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'benefit_plans',
        'organizationsId',
        {
          type: Sequelize.DataTypes.UUID,

          references: {
            model: 'organizations',
            key: 'id',
          },
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'bills',
        'organizationsId',
        {
          type: Sequelize.DataTypes.UUID,

          references: {
            model: 'organizations',
            key: 'id',
          },
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'candidates',
        'organizationsId',
        {
          type: Sequelize.DataTypes.UUID,

          references: {
            model: 'organizations',
            key: 'id',
          },
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'cards',
        'organizationsId',
        {
          type: Sequelize.DataTypes.UUID,

          references: {
            model: 'organizations',
            key: 'id',
          },
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'compensations',
        'organizationsId',
        {
          type: Sequelize.DataTypes.UUID,

          references: {
            model: 'organizations',
            key: 'id',
          },
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'deductions',
        'organizationsId',
        {
          type: Sequelize.DataTypes.UUID,

          references: {
            model: 'organizations',
            key: 'id',
          },
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'devices',
        'organizationsId',
        {
          type: Sequelize.DataTypes.UUID,

          references: {
            model: 'organizations',
            key: 'id',
          },
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'documents',
        'organizationsId',
        {
          type: Sequelize.DataTypes.UUID,

          references: {
            model: 'organizations',
            key: 'id',
          },
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'earnings',
        'organizationsId',
        {
          type: Sequelize.DataTypes.UUID,

          references: {
            model: 'organizations',
            key: 'id',
          },
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'employees',
        'organizationsId',
        {
          type: Sequelize.DataTypes.UUID,

          references: {
            model: 'organizations',
            key: 'id',
          },
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'employments',
        'organizationsId',
        {
          type: Sequelize.DataTypes.UUID,

          references: {
            model: 'organizations',
            key: 'id',
          },
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'enrollment_learnings',
        'organizationsId',
        {
          type: Sequelize.DataTypes.UUID,

          references: {
            model: 'organizations',
            key: 'id',
          },
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'enrollments',
        'organizationsId',
        {
          type: Sequelize.DataTypes.UUID,

          references: {
            model: 'organizations',
            key: 'id',
          },
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'expense_lines',
        'organizationsId',
        {
          type: Sequelize.DataTypes.UUID,

          references: {
            model: 'organizations',
            key: 'id',
          },
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'expense_reports',
        'organizationsId',
        {
          type: Sequelize.DataTypes.UUID,

          references: {
            model: 'organizations',
            key: 'id',
          },
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'goals',
        'organizationsId',
        {
          type: Sequelize.DataTypes.UUID,

          references: {
            model: 'organizations',
            key: 'id',
          },
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'identity_accounts',
        'organizationsId',
        {
          type: Sequelize.DataTypes.UUID,

          references: {
            model: 'organizations',
            key: 'id',
          },
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'interviews',
        'organizationsId',
        {
          type: Sequelize.DataTypes.UUID,

          references: {
            model: 'organizations',
            key: 'id',
          },
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'inventory_events',
        'organizationsId',
        {
          type: Sequelize.DataTypes.UUID,

          references: {
            model: 'organizations',
            key: 'id',
          },
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'job_requisitions',
        'organizationsId',
        {
          type: Sequelize.DataTypes.UUID,

          references: {
            model: 'organizations',
            key: 'id',
          },
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'learning_courses',
        'organizationsId',
        {
          type: Sequelize.DataTypes.UUID,

          references: {
            model: 'organizations',
            key: 'id',
          },
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'leave_requests',
        'organizationsId',
        {
          type: Sequelize.DataTypes.UUID,

          references: {
            model: 'organizations',
            key: 'id',
          },
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'offers',
        'organizationsId',
        {
          type: Sequelize.DataTypes.UUID,

          references: {
            model: 'organizations',
            key: 'id',
          },
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'payments',
        'organizationsId',
        {
          type: Sequelize.DataTypes.UUID,

          references: {
            model: 'organizations',
            key: 'id',
          },
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'payroll_runs',
        'organizationsId',
        {
          type: Sequelize.DataTypes.UUID,

          references: {
            model: 'organizations',
            key: 'id',
          },
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'policies',
        'organizationsId',
        {
          type: Sequelize.DataTypes.UUID,

          references: {
            model: 'organizations',
            key: 'id',
          },
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'positions',
        'organizationsId',
        {
          type: Sequelize.DataTypes.UUID,

          references: {
            model: 'organizations',
            key: 'id',
          },
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'review_cycles',
        'organizationsId',
        {
          type: Sequelize.DataTypes.UUID,

          references: {
            model: 'organizations',
            key: 'id',
          },
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'reviews',
        'organizationsId',
        {
          type: Sequelize.DataTypes.UUID,

          references: {
            model: 'organizations',
            key: 'id',
          },
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'schedule_shifts',
        'organizationsId',
        {
          type: Sequelize.DataTypes.UUID,

          references: {
            model: 'organizations',
            key: 'id',
          },
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'taxes',
        'organizationsId',
        {
          type: Sequelize.DataTypes.UUID,

          references: {
            model: 'organizations',
            key: 'id',
          },
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'time_entries',
        'organizationsId',
        {
          type: Sequelize.DataTypes.UUID,

          references: {
            model: 'organizations',
            key: 'id',
          },
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'timecards',
        'organizationsId',
        {
          type: Sequelize.DataTypes.UUID,

          references: {
            model: 'organizations',
            key: 'id',
          },
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'travel_bookings',
        'organizationsId',
        {
          type: Sequelize.DataTypes.UUID,

          references: {
            model: 'organizations',
            key: 'id',
          },
        },
        { transaction },
      );

      await queryInterface.addColumn(
        'vendors',
        'organizationsId',
        {
          type: Sequelize.DataTypes.UUID,

          references: {
            model: 'organizations',
            key: 'id',
          },
        },
        { transaction },
      );

      await transaction.commit();
    } catch (err) {
      await transaction.rollback();
      throw err;
    }
  },
  /**
   * @param {QueryInterface} queryInterface
   * @param {Sequelize} Sequelize
   * @returns {Promise<void>}
   */
  async down(queryInterface, Sequelize) {
    /**
     * @type {Transaction}
     */
    const transaction = await queryInterface.sequelize.transaction();
    try {
      await queryInterface.removeColumn('vendors', 'organizationsId', {
        transaction,
      });

      await queryInterface.removeColumn('travel_bookings', 'organizationsId', {
        transaction,
      });

      await queryInterface.removeColumn('timecards', 'organizationsId', {
        transaction,
      });

      await queryInterface.removeColumn('time_entries', 'organizationsId', {
        transaction,
      });

      await queryInterface.removeColumn('taxes', 'organizationsId', {
        transaction,
      });

      await queryInterface.removeColumn('schedule_shifts', 'organizationsId', {
        transaction,
      });

      await queryInterface.removeColumn('reviews', 'organizationsId', {
        transaction,
      });

      await queryInterface.removeColumn('review_cycles', 'organizationsId', {
        transaction,
      });

      await queryInterface.removeColumn('positions', 'organizationsId', {
        transaction,
      });

      await queryInterface.removeColumn('policies', 'organizationsId', {
        transaction,
      });

      await queryInterface.removeColumn('payroll_runs', 'organizationsId', {
        transaction,
      });

      await queryInterface.removeColumn('payments', 'organizationsId', {
        transaction,
      });

      await queryInterface.removeColumn('offers', 'organizationsId', {
        transaction,
      });

      await queryInterface.removeColumn('leave_requests', 'organizationsId', {
        transaction,
      });

      await queryInterface.removeColumn('learning_courses', 'organizationsId', {
        transaction,
      });

      await queryInterface.removeColumn('job_requisitions', 'organizationsId', {
        transaction,
      });

      await queryInterface.removeColumn('inventory_events', 'organizationsId', {
        transaction,
      });

      await queryInterface.removeColumn('interviews', 'organizationsId', {
        transaction,
      });

      await queryInterface.removeColumn(
        'identity_accounts',
        'organizationsId',
        { transaction },
      );

      await queryInterface.removeColumn('goals', 'organizationsId', {
        transaction,
      });

      await queryInterface.removeColumn('expense_reports', 'organizationsId', {
        transaction,
      });

      await queryInterface.removeColumn('expense_lines', 'organizationsId', {
        transaction,
      });

      await queryInterface.removeColumn('enrollments', 'organizationsId', {
        transaction,
      });

      await queryInterface.removeColumn(
        'enrollment_learnings',
        'organizationsId',
        { transaction },
      );

      await queryInterface.removeColumn('employments', 'organizationsId', {
        transaction,
      });

      await queryInterface.removeColumn('employees', 'organizationsId', {
        transaction,
      });

      await queryInterface.removeColumn('earnings', 'organizationsId', {
        transaction,
      });

      await queryInterface.removeColumn('documents', 'organizationsId', {
        transaction,
      });

      await queryInterface.removeColumn('devices', 'organizationsId', {
        transaction,
      });

      await queryInterface.removeColumn('deductions', 'organizationsId', {
        transaction,
      });

      await queryInterface.removeColumn('compensations', 'organizationsId', {
        transaction,
      });

      await queryInterface.removeColumn('cards', 'organizationsId', {
        transaction,
      });

      await queryInterface.removeColumn('candidates', 'organizationsId', {
        transaction,
      });

      await queryInterface.removeColumn('bills', 'organizationsId', {
        transaction,
      });

      await queryInterface.removeColumn('benefit_plans', 'organizationsId', {
        transaction,
      });

      await queryInterface.removeColumn('audit_logs', 'organizationsId', {
        transaction,
      });

      await queryInterface.removeColumn('approvals', 'organizationsId', {
        transaction,
      });

      await queryInterface.removeColumn('applications', 'organizationsId', {
        transaction,
      });

      await queryInterface.removeColumn('app_accounts', 'organizationsId', {
        transaction,
      });

      await queryInterface.removeColumn('users', 'organizationsId', {
        transaction,
      });

      await queryInterface.removeColumn('roles', 'globalAccess', {
        transaction,
      });

      await queryInterface.removeColumn('organizations', 'name', {
        transaction,
      });

      await queryInterface.removeColumn('users', 'app_roleId', { transaction });

      await queryInterface.removeColumn('roles', 'role_customization', {
        transaction,
      });

      await queryInterface.removeColumn('roles', 'name', { transaction });

      await queryInterface.removeColumn('permissions', 'name', { transaction });

      await queryInterface.removeColumn('vendors', 'currency', { transaction });

      await queryInterface.removeColumn('vendors', 'country', { transaction });

      await queryInterface.removeColumn('vendors', 'tax_id', { transaction });

      await queryInterface.removeColumn('vendors', 'name', { transaction });

      await queryInterface.removeColumn('travel_bookings', 'policy_result', {
        transaction,
      });

      await queryInterface.removeColumn('travel_bookings', 'cost', {
        transaction,
      });

      await queryInterface.removeColumn('travel_bookings', 'end', {
        transaction,
      });

      await queryInterface.removeColumn('travel_bookings', 'start', {
        transaction,
      });

      await queryInterface.removeColumn('travel_bookings', 'provider', {
        transaction,
      });

      await queryInterface.removeColumn('travel_bookings', 'type', {
        transaction,
      });

      await queryInterface.removeColumn('travel_bookings', 'employeeId', {
        transaction,
      });

      await queryInterface.removeColumn('timecards', 'status', { transaction });

      await queryInterface.removeColumn('timecards', 'period', { transaction });

      await queryInterface.removeColumn('timecards', 'employeeId', {
        transaction,
      });

      await queryInterface.removeColumn('time_entries', 'job_code', {
        transaction,
      });

      await queryInterface.removeColumn('time_entries', 'break_minutes', {
        transaction,
      });

      await queryInterface.removeColumn('time_entries', 'end', { transaction });

      await queryInterface.removeColumn('time_entries', 'start', {
        transaction,
      });

      await queryInterface.removeColumn('time_entries', 'date', {
        transaction,
      });

      await queryInterface.removeColumn('time_entries', 'timecardId', {
        transaction,
      });

      await queryInterface.removeColumn('taxes', 'amount', { transaction });

      await queryInterface.removeColumn('taxes', 'jurisdiction', {
        transaction,
      });

      await queryInterface.removeColumn('taxes', 'employeeId', { transaction });

      await queryInterface.removeColumn('taxes', 'payroll_runId', {
        transaction,
      });

      await queryInterface.removeColumn('schedule_shifts', 'role', {
        transaction,
      });

      await queryInterface.removeColumn('schedule_shifts', 'end', {
        transaction,
      });

      await queryInterface.removeColumn('schedule_shifts', 'start', {
        transaction,
      });

      await queryInterface.removeColumn('schedule_shifts', 'date', {
        transaction,
      });

      await queryInterface.removeColumn('schedule_shifts', 'employeeId', {
        transaction,
      });

      await queryInterface.removeColumn('reviews', 'comments', { transaction });

      await queryInterface.removeColumn('reviews', 'reviewerId', {
        transaction,
      });

      await queryInterface.removeColumn('reviews', 'employeeId', {
        transaction,
      });

      await queryInterface.removeColumn('reviews', 'review_cycleId', {
        transaction,
      });

      await queryInterface.removeColumn('review_cycles', 'status', {
        transaction,
      });

      await queryInterface.removeColumn('review_cycles', 'cycle_end', {
        transaction,
      });

      await queryInterface.removeColumn('review_cycles', 'cycle_start', {
        transaction,
      });

      await queryInterface.removeColumn('review_cycles', 'name', {
        transaction,
      });

      await queryInterface.removeColumn('positions', 'managerId', {
        transaction,
      });

      await queryInterface.removeColumn('positions', 'level', { transaction });

      await queryInterface.removeColumn('positions', 'job_family', {
        transaction,
      });

      await queryInterface.removeColumn('positions', 'title', { transaction });

      await queryInterface.removeColumn('policies', 'effect', { transaction });

      await queryInterface.removeColumn('policies', 'rule_logic', {
        transaction,
      });

      await queryInterface.removeColumn('policies', 'scope', { transaction });

      await queryInterface.removeColumn('payroll_runs', 'status', {
        transaction,
      });

      await queryInterface.removeColumn('payroll_runs', 'pay_date', {
        transaction,
      });

      await queryInterface.removeColumn('payroll_runs', 'pay_period_end', {
        transaction,
      });

      await queryInterface.removeColumn('payroll_runs', 'pay_period_start', {
        transaction,
      });

      await queryInterface.removeColumn('payroll_runs', 'country', {
        transaction,
      });

      await queryInterface.removeColumn('payments', 'amount', { transaction });

      await queryInterface.removeColumn('payments', 'paid_at', { transaction });

      await queryInterface.removeColumn('payments', 'method', { transaction });

      await queryInterface.removeColumn('payments', 'billId', { transaction });

      await queryInterface.removeColumn('offers', 'status', { transaction });

      await queryInterface.removeColumn('offers', 'target_start_date', {
        transaction,
      });

      await queryInterface.removeColumn('offers', 'comp_package', {
        transaction,
      });

      await queryInterface.removeColumn('offers', 'applicationId', {
        transaction,
      });

      await queryInterface.removeColumn('leave_requests', 'status', {
        transaction,
      });

      await queryInterface.removeColumn('leave_requests', 'hours', {
        transaction,
      });

      await queryInterface.removeColumn('leave_requests', 'end', {
        transaction,
      });

      await queryInterface.removeColumn('leave_requests', 'start', {
        transaction,
      });

      await queryInterface.removeColumn('leave_requests', 'type', {
        transaction,
      });

      await queryInterface.removeColumn('leave_requests', 'employeeId', {
        transaction,
      });

      await queryInterface.removeColumn('learning_courses', 'compliance_tag', {
        transaction,
      });

      await queryInterface.removeColumn('learning_courses', 'hours', {
        transaction,
      });

      await queryInterface.removeColumn('learning_courses', 'provider', {
        transaction,
      });

      await queryInterface.removeColumn('learning_courses', 'title', {
        transaction,
      });

      await queryInterface.removeColumn('job_requisitions', 'recruiterId', {
        transaction,
      });

      await queryInterface.removeColumn('job_requisitions', 'status', {
        transaction,
      });

      await queryInterface.removeColumn('job_requisitions', 'openings', {
        transaction,
      });

      await queryInterface.removeColumn('job_requisitions', 'employment_type', {
        transaction,
      });

      await queryInterface.removeColumn('job_requisitions', 'title', {
        transaction,
      });

      await queryInterface.removeColumn('inventory_events', 'metadata', {
        transaction,
      });

      await queryInterface.removeColumn('inventory_events', 'timestamp', {
        transaction,
      });

      await queryInterface.removeColumn('inventory_events', 'event_type', {
        transaction,
      });

      await queryInterface.removeColumn('inventory_events', 'deviceId', {
        transaction,
      });

      await queryInterface.removeColumn('interviews', 'notes', { transaction });

      await queryInterface.removeColumn('interviews', 'rating', {
        transaction,
      });

      await queryInterface.removeColumn('interviews', 'scheduled_at', {
        transaction,
      });

      await queryInterface.removeColumn('interviews', 'type', { transaction });

      await queryInterface.removeColumn('interviews', 'interviewerId', {
        transaction,
      });

      await queryInterface.removeColumn('interviews', 'applicationId', {
        transaction,
      });

      await queryInterface.removeColumn('identity_accounts', 'username', {
        transaction,
      });

      await queryInterface.removeColumn('identity_accounts', 'idp', {
        transaction,
      });

      await queryInterface.removeColumn('identity_accounts', 'employeeId', {
        transaction,
      });

      await queryInterface.removeColumn('goals', 'progress', { transaction });

      await queryInterface.removeColumn('goals', 'due', { transaction });

      await queryInterface.removeColumn('goals', 'start', { transaction });

      await queryInterface.removeColumn('goals', 'target', { transaction });

      await queryInterface.removeColumn('goals', 'metric', { transaction });

      await queryInterface.removeColumn('goals', 'title', { transaction });

      await queryInterface.removeColumn('goals', 'type', { transaction });

      await queryInterface.removeColumn('goals', 'employeeId', { transaction });

      await queryInterface.removeColumn('expense_reports', 'policy_result', {
        transaction,
      });

      await queryInterface.removeColumn('expense_reports', 'status', {
        transaction,
      });

      await queryInterface.removeColumn('expense_reports', 'submitted_at', {
        transaction,
      });

      await queryInterface.removeColumn('expense_reports', 'employeeId', {
        transaction,
      });

      await queryInterface.removeColumn('expense_lines', 'category', {
        transaction,
      });

      await queryInterface.removeColumn('expense_lines', 'currency', {
        transaction,
      });

      await queryInterface.removeColumn('expense_lines', 'amount', {
        transaction,
      });

      await queryInterface.removeColumn('expense_lines', 'merchant', {
        transaction,
      });

      await queryInterface.removeColumn('expense_lines', 'date', {
        transaction,
      });

      await queryInterface.removeColumn('expense_lines', 'reportId', {
        transaction,
      });

      await queryInterface.removeColumn('enrollments', 'status', {
        transaction,
      });

      await queryInterface.removeColumn('enrollments', 'premium_employer', {
        transaction,
      });

      await queryInterface.removeColumn('enrollments', 'premium_employee', {
        transaction,
      });

      await queryInterface.removeColumn('enrollments', 'effective_date', {
        transaction,
      });

      await queryInterface.removeColumn('enrollments', 'planId', {
        transaction,
      });

      await queryInterface.removeColumn('enrollments', 'employeeId', {
        transaction,
      });

      await queryInterface.removeColumn('enrollment_learnings', 'status', {
        transaction,
      });

      await queryInterface.removeColumn('enrollment_learnings', 'due_date', {
        transaction,
      });

      await queryInterface.removeColumn(
        'enrollment_learnings',
        'assigned_byId',
        { transaction },
      );

      await queryInterface.removeColumn('enrollment_learnings', 'courseId', {
        transaction,
      });

      await queryInterface.removeColumn('enrollment_learnings', 'employeeId', {
        transaction,
      });

      await queryInterface.removeColumn('employments', 'status', {
        transaction,
      });

      await queryInterface.removeColumn('employments', 'fte', { transaction });

      await queryInterface.removeColumn('employments', 'end_date', {
        transaction,
      });

      await queryInterface.removeColumn('employments', 'start_date', {
        transaction,
      });

      await queryInterface.removeColumn('employments', 'employment_type', {
        transaction,
      });

      await queryInterface.removeColumn('employments', 'employeeId', {
        transaction,
      });

      await queryInterface.removeColumn('employees', 'userId', { transaction });

      await queryInterface.removeColumn('earnings', 'taxable', { transaction });

      await queryInterface.removeColumn('earnings', 'currency', {
        transaction,
      });

      await queryInterface.removeColumn('earnings', 'amount', { transaction });

      await queryInterface.removeColumn('earnings', 'rate', { transaction });

      await queryInterface.removeColumn('earnings', 'units', { transaction });

      await queryInterface.removeColumn('earnings', 'component', {
        transaction,
      });

      await queryInterface.removeColumn('earnings', 'employeeId', {
        transaction,
      });

      await queryInterface.removeColumn('earnings', 'payroll_runId', {
        transaction,
      });

      await queryInterface.removeColumn('documents', 'signed_at', {
        transaction,
      });

      await queryInterface.removeColumn('documents', 'status', { transaction });

      await queryInterface.removeColumn('documents', 'country', {
        transaction,
      });

      await queryInterface.removeColumn('documents', 'doc_type', {
        transaction,
      });

      await queryInterface.removeColumn('documents', 'ownerId', {
        transaction,
      });

      await queryInterface.removeColumn('devices', 'os_version', {
        transaction,
      });

      await queryInterface.removeColumn('devices', 'encryption', {
        transaction,
      });

      await queryInterface.removeColumn('devices', 'status', { transaction });

      await queryInterface.removeColumn('devices', 'ownerId', { transaction });

      await queryInterface.removeColumn('devices', 'asset_tag', {
        transaction,
      });

      await queryInterface.removeColumn('devices', 'serial', { transaction });

      await queryInterface.removeColumn('devices', 'platform', { transaction });

      await queryInterface.removeColumn('devices', 'type', { transaction });

      await queryInterface.removeColumn('deductions', 'amount', {
        transaction,
      });

      await queryInterface.removeColumn('deductions', 'type', { transaction });

      await queryInterface.removeColumn('deductions', 'employeeId', {
        transaction,
      });

      await queryInterface.removeColumn('deductions', 'payroll_runId', {
        transaction,
      });

      await queryInterface.removeColumn('compensations', 'effective_date', {
        transaction,
      });

      await queryInterface.removeColumn('compensations', 'currency', {
        transaction,
      });

      await queryInterface.removeColumn('compensations', 'pay_frequency', {
        transaction,
      });

      await queryInterface.removeColumn('compensations', 'pay_type', {
        transaction,
      });

      await queryInterface.removeColumn('compensations', 'base_pay', {
        transaction,
      });

      await queryInterface.removeColumn('compensations', 'employeeId', {
        transaction,
      });

      await queryInterface.removeColumn('cards', 'status', { transaction });

      await queryInterface.removeColumn('cards', 'limit', { transaction });

      await queryInterface.removeColumn('cards', 'last4', { transaction });

      await queryInterface.removeColumn('cards', 'type', { transaction });

      await queryInterface.removeColumn('cards', 'employeeId', { transaction });

      await queryInterface.removeColumn('candidates', 'current_stage', {
        transaction,
      });

      await queryInterface.removeColumn('candidates', 'source', {
        transaction,
      });

      await queryInterface.removeColumn('candidates', 'phone', { transaction });

      await queryInterface.removeColumn('candidates', 'email', { transaction });

      await queryInterface.removeColumn('candidates', 'name', { transaction });

      await queryInterface.removeColumn('bills', 'status', { transaction });

      await queryInterface.removeColumn('bills', 'category', { transaction });

      await queryInterface.removeColumn('bills', 'currency', { transaction });

      await queryInterface.removeColumn('bills', 'amount', { transaction });

      await queryInterface.removeColumn('bills', 'due_date', { transaction });

      await queryInterface.removeColumn('bills', 'invoice_date', {
        transaction,
      });

      await queryInterface.removeColumn('bills', 'invoice_no', { transaction });

      await queryInterface.removeColumn('bills', 'vendorId', { transaction });

      await queryInterface.removeColumn('benefit_plans', 'currency', {
        transaction,
      });

      await queryInterface.removeColumn('benefit_plans', 'country', {
        transaction,
      });

      await queryInterface.removeColumn('benefit_plans', 'plan_type', {
        transaction,
      });

      await queryInterface.removeColumn('benefit_plans', 'carrier', {
        transaction,
      });

      await queryInterface.removeColumn('audit_logs', 'diff', { transaction });

      await queryInterface.removeColumn('audit_logs', 'timestamp', {
        transaction,
      });

      await queryInterface.removeColumn('audit_logs', 'object_id', {
        transaction,
      });

      await queryInterface.removeColumn('audit_logs', 'object_type', {
        transaction,
      });

      await queryInterface.removeColumn('audit_logs', 'action', {
        transaction,
      });

      await queryInterface.removeColumn('audit_logs', 'actor', { transaction });

      await queryInterface.removeColumn('approvals', 'timestamp', {
        transaction,
      });

      await queryInterface.removeColumn('approvals', 'status', { transaction });

      await queryInterface.removeColumn('approvals', 'step', { transaction });

      await queryInterface.removeColumn('approvals', 'approverId', {
        transaction,
      });

      await queryInterface.removeColumn('approvals', 'object_id', {
        transaction,
      });

      await queryInterface.removeColumn('approvals', 'object_type', {
        transaction,
      });

      await queryInterface.removeColumn('applications', 'status', {
        transaction,
      });

      await queryInterface.removeColumn('applications', 'submitted_at', {
        transaction,
      });

      await queryInterface.removeColumn('applications', 'requisitionId', {
        transaction,
      });

      await queryInterface.removeColumn('applications', 'candidateId', {
        transaction,
      });

      await queryInterface.removeColumn('app_accounts', 'status', {
        transaction,
      });

      await queryInterface.removeColumn('app_accounts', 'role', {
        transaction,
      });

      await queryInterface.removeColumn('app_accounts', 'employeeId', {
        transaction,
      });

      await queryInterface.removeColumn('users', 'provider', { transaction });

      await queryInterface.removeColumn(
        'users',
        'passwordResetTokenExpiresAt',
        { transaction },
      );

      await queryInterface.removeColumn('users', 'passwordResetToken', {
        transaction,
      });

      await queryInterface.removeColumn(
        'users',
        'emailVerificationTokenExpiresAt',
        { transaction },
      );

      await queryInterface.removeColumn('users', 'emailVerificationToken', {
        transaction,
      });

      await queryInterface.removeColumn('users', 'emailVerified', {
        transaction,
      });

      await queryInterface.removeColumn('users', 'password', { transaction });

      await queryInterface.removeColumn('users', 'disabled', { transaction });

      await queryInterface.removeColumn('users', 'email', { transaction });

      await queryInterface.removeColumn('users', 'phoneNumber', {
        transaction,
      });

      await queryInterface.removeColumn('users', 'lastName', { transaction });

      await queryInterface.removeColumn('users', 'firstName', { transaction });

      await queryInterface.dropTable('organizations', { transaction });

      await queryInterface.dropTable('permissions', { transaction });

      await queryInterface.dropTable('roles', { transaction });

      await queryInterface.dropTable('vendors', { transaction });

      await queryInterface.dropTable('travel_bookings', { transaction });

      await queryInterface.dropTable('timecards', { transaction });

      await queryInterface.dropTable('time_entries', { transaction });

      await queryInterface.dropTable('taxes', { transaction });

      await queryInterface.dropTable('schedule_shifts', { transaction });

      await queryInterface.dropTable('reviews', { transaction });

      await queryInterface.dropTable('review_cycles', { transaction });

      await queryInterface.dropTable('positions', { transaction });

      await queryInterface.dropTable('policies', { transaction });

      await queryInterface.dropTable('payroll_runs', { transaction });

      await queryInterface.dropTable('payments', { transaction });

      await queryInterface.dropTable('offers', { transaction });

      await queryInterface.dropTable('leave_requests', { transaction });

      await queryInterface.dropTable('learning_courses', { transaction });

      await queryInterface.dropTable('job_requisitions', { transaction });

      await queryInterface.dropTable('inventory_events', { transaction });

      await queryInterface.dropTable('interviews', { transaction });

      await queryInterface.dropTable('identity_accounts', { transaction });

      await queryInterface.dropTable('goals', { transaction });

      await queryInterface.dropTable('expense_reports', { transaction });

      await queryInterface.dropTable('expense_lines', { transaction });

      await queryInterface.dropTable('enrollments', { transaction });

      await queryInterface.dropTable('enrollment_learnings', { transaction });

      await queryInterface.dropTable('employments', { transaction });

      await queryInterface.dropTable('employees', { transaction });

      await queryInterface.dropTable('earnings', { transaction });

      await queryInterface.dropTable('documents', { transaction });

      await queryInterface.dropTable('devices', { transaction });

      await queryInterface.dropTable('deductions', { transaction });

      await queryInterface.dropTable('compensations', { transaction });

      await queryInterface.dropTable('cards', { transaction });

      await queryInterface.dropTable('candidates', { transaction });

      await queryInterface.dropTable('bills', { transaction });

      await queryInterface.dropTable('benefit_plans', { transaction });

      await queryInterface.dropTable('audit_logs', { transaction });

      await queryInterface.dropTable('approvals', { transaction });

      await queryInterface.dropTable('applications', { transaction });

      await queryInterface.dropTable('app_accounts', { transaction });

      await queryInterface.dropTable('users', { transaction });

      await transaction.commit();
    } catch (err) {
      await transaction.rollback();
      throw err;
    }
  },
};
