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('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('system_parameters', {
                        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('holidays', {
                        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('sss_contribution_tables', {
                        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('withholding_tax_tables', {
                        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('fiscal_periods', {
                        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('cost_centers', {
                        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('departments', {
                        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('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('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('employee_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('time_records', {
                        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('biometric_imports', {
                        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_types', {
                        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_balances', {
                        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_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('employee_loans', {
                        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('loan_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('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('payroll_items', {
                        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('bank_files', {
                        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('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('journal_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('journal_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('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('ap_invoices', {
                        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('ap_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('ap_payment_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('customers', {
                        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('ar_invoices', {
                        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('ar_invoice_items', {
                        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('applicants', {
                        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('approval_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('notifications', {
                        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('export_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('password_histories', {
                        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('refresh_tokens', {
                        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.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(
                      'users',
                      'app_roleId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'roles',
                                key: 'id',
                            },
                          
                      },
                      { 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(
                      'permissions',
                      'name',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'system_parameters',
                      'key',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'system_parameters',
                      'value',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'system_parameters',
                      'description',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'system_parameters',
                      'lastUpdatedAt',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'system_parameters',
                      'lastUpdatedByUserId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'users',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'holidays',
                      'holidayDate',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'holidays',
                      'holidayName',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'holidays',
                      'holidayType',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['REGULAR','REGULAR_HOLIDAY','SPECIAL_HOLIDAY','REST_DAY'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'holidays',
                      'year',
                      {
                          type: Sequelize.DataTypes.INTEGER,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'holidays',
                      'isRecurring',
                      {
                          type: Sequelize.DataTypes.BOOLEAN,
                          
                            defaultValue: false,
                            allowNull: false,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'sss_contribution_tables',
                      'salaryFrom',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'sss_contribution_tables',
                      'salaryTo',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'sss_contribution_tables',
                      'msc',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'sss_contribution_tables',
                      'employeeShare',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'sss_contribution_tables',
                      'employerShare',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'sss_contribution_tables',
                      'wispEmployee',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'sss_contribution_tables',
                      'wispEmployer',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'sss_contribution_tables',
                      'effectiveYear',
                      {
                          type: Sequelize.DataTypes.INTEGER,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'withholding_tax_tables',
                      'periodType',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['SEMI_MONTHLY','MONTHLY','ANNUAL'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'withholding_tax_tables',
                      'salaryFrom',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'withholding_tax_tables',
                      'salaryTo',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'withholding_tax_tables',
                      'baseTax',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'withholding_tax_tables',
                      'excessRate',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'withholding_tax_tables',
                      'excessOver',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'withholding_tax_tables',
                      'effectiveYear',
                      {
                          type: Sequelize.DataTypes.INTEGER,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'fiscal_periods',
                      'year',
                      {
                          type: Sequelize.DataTypes.INTEGER,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'fiscal_periods',
                      'month',
                      {
                          type: Sequelize.DataTypes.INTEGER,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'fiscal_periods',
                      'status',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['OPEN','CLOSED','LOCKED'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'fiscal_periods',
                      'openedAt',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'fiscal_periods',
                      'closedAt',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'fiscal_periods',
                      'closedByUserId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'users',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'fiscal_periods',
                      'lockedAt',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'fiscal_periods',
                      'lockedByUserId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'users',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'cost_centers',
                      'code',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'cost_centers',
                      'name',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'cost_centers',
                      'isActive',
                      {
                          type: Sequelize.DataTypes.BOOLEAN,
                          
                            defaultValue: false,
                            allowNull: false,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'departments',
                      'code',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'departments',
                      'name',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'departments',
                      'costCenterId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'cost_centers',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'departments',
                      'isActive',
                      {
                          type: Sequelize.DataTypes.BOOLEAN,
                          
                            defaultValue: false,
                            allowNull: false,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'positions',
                      'title',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'positions',
                      'jobLevel',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['RANK_AND_FILE','SUPERVISOR','MANAGER','OFFICER'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'positions',
                      'isActive',
                      {
                          type: Sequelize.DataTypes.BOOLEAN,
                          
                            defaultValue: false,
                            allowNull: false,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'shifts',
                      'name',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'shifts',
                      'timeIn',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'shifts',
                      'timeOut',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'shifts',
                      'breakDurationMinutes',
                      {
                          type: Sequelize.DataTypes.INTEGER,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'shifts',
                      'totalWorkingHours',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'shifts',
                      'isRotating',
                      {
                          type: Sequelize.DataTypes.BOOLEAN,
                          
                            defaultValue: false,
                            allowNull: false,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'shifts',
                      'rotationCycleDays',
                      {
                          type: Sequelize.DataTypes.INTEGER,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'shifts',
                      'isActive',
                      {
                          type: Sequelize.DataTypes.BOOLEAN,
                          
                            defaultValue: false,
                            allowNull: false,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'employees',
                      'employeeCode',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'employees',
                      'firstName',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'employees',
                      'middleName',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'employees',
                      'lastName',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'employees',
                      'nameExtension',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'employees',
                      'dateOfBirth',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'employees',
                      'placeOfBirth',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'employees',
                      'sex',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['MALE','FEMALE'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'employees',
                      'civilStatus',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['SINGLE','MARRIED','WIDOWED','SEPARATED','LEGALLY_SEPARATED'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'employees',
                      'nationality',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'employees',
                      'religion',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'employees',
                      'bloodType',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
            
                
                    
                    await queryInterface.addColumn(
                      'employees',
                      'homeStreet',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'employees',
                      'homeBarangay',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'employees',
                      'homeCity',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'employees',
                      'homeProvince',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'employees',
                      'homeZipCode',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'employees',
                      'permanentAddressSame',
                      {
                          type: Sequelize.DataTypes.BOOLEAN,
                          
                            defaultValue: false,
                            allowNull: false,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'employees',
                      'permanentStreet',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'employees',
                      'permanentBarangay',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'employees',
                      'permanentCity',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'employees',
                      'permanentProvince',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'employees',
                      'permanentZipCode',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'employees',
                      'personalEmail',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'employees',
                      'personalMobile',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'employees',
                      'emergencyContactName',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'employees',
                      'emergencyContactRel',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'employees',
                      'emergencyContactMobile',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'employees',
                      'sssNumber',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'employees',
                      'philhealthNumber',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'employees',
                      'pagibigNumber',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'employees',
                      'tinNumber',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'employees',
                      'bankName',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'employees',
                      'bankAccountNumber',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'employees',
                      'bankAccountName',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'employees',
                      'employmentDate',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'employees',
                      'regularizationDate',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'employees',
                      'employmentStatus',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['PROBATIONARY','REGULAR','CONTRACTUAL','PROJECT_BASED'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'employees',
                      'employmentType',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['FULL_TIME','PART_TIME'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'employees',
                      'jobLevel',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['RANK_AND_FILE','SUPERVISOR','MANAGER','OFFICER'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'employees',
                      'salaryType',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['MONTHLY','DAILY','HOURLY'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'employees',
                      'basicSalary',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'employees',
                      'taxStatus',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['S','ME','S1','S2','S3','S4','ME1','ME2','ME3','ME4'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'employees',
                      'workLocation',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'employees',
                      'separationDate',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'employees',
                      'separationType',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['RESIGNED','TERMINATED','RETIRED','REDUNDANCY','AWOL','DEATH'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'employees',
                      'separationReason',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'employees',
                      'clearanceStatus',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'employees',
                      'finalPayAmount',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'employees',
                      'finalPayReleasedDate',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'employees',
                      'isActive',
                      {
                          type: Sequelize.DataTypes.BOOLEAN,
                          
                            defaultValue: false,
                            allowNull: false,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'employees',
                      'departmentId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'departments',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'employees',
                      'positionId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'positions',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'employees',
                      'shiftId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'shifts',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'employees',
                      'reportingToId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'employees',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'employee_documents',
                      'employeeId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'employees',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'employee_documents',
                      'documentType',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['NBI_CLEARANCE','MEDICAL_CERTIFICATE','SSS_FORM','PHILHEALTH_MDR','PAGIBIG_MMID','BIR_FORM','EMPLOYMENT_CONTRACT','JOB_OFFER','DIPLOMA','TRAINING_CERTIFICATE','PERFORMANCE_APPRAISAL','CONSENT_FORM','OTHER'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'employee_documents',
                      'fileName',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
            
                
                    
                    await queryInterface.addColumn(
                      'employee_documents',
                      'uploadedAt',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'employee_documents',
                      'uploadedByUserId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'users',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'time_records',
                      'employeeId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'employees',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'time_records',
                      'shiftId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'shifts',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'time_records',
                      'workDate',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'time_records',
                      'scheduledTimeIn',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'time_records',
                      'scheduledTimeOut',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'time_records',
                      'actualTimeIn',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'time_records',
                      'actualTimeOut',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'time_records',
                      'tardinessMinutes',
                      {
                          type: Sequelize.DataTypes.INTEGER,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'time_records',
                      'undertimeMinutes',
                      {
                          type: Sequelize.DataTypes.INTEGER,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'time_records',
                      'overtimeMinutes',
                      {
                          type: Sequelize.DataTypes.INTEGER,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'time_records',
                      'nightDiffHours',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'time_records',
                      'workType',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['REGULAR','REST_DAY','REGULAR_HOLIDAY','SPECIAL_HOLIDAY'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'time_records',
                      'isAbsent',
                      {
                          type: Sequelize.DataTypes.BOOLEAN,
                          
                            defaultValue: false,
                            allowNull: false,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'time_records',
                      'isHalfDay',
                      {
                          type: Sequelize.DataTypes.BOOLEAN,
                          
                            defaultValue: false,
                            allowNull: false,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'time_records',
                      'halfDayType',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['AM','PM'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'time_records',
                      'source',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['BIOMETRIC','MANUAL','SYSTEM'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'time_records',
                      'modifiedByUserId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'users',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'time_records',
                      'modificationReason',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'time_records',
                      'approvedByUserId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'users',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'time_records',
                      'approvedAt',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'time_records',
                      'payrollRunId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'payroll_runs',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'biometric_imports',
                      'importDate',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'biometric_imports',
                      'deviceCode',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'biometric_imports',
                      'fileName',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'biometric_imports',
                      'totalRecords',
                      {
                          type: Sequelize.DataTypes.INTEGER,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'biometric_imports',
                      'successCount',
                      {
                          type: Sequelize.DataTypes.INTEGER,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'biometric_imports',
                      'errorCount',
                      {
                          type: Sequelize.DataTypes.INTEGER,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'biometric_imports',
                      'errorDetailsJson',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'biometric_imports',
                      'importedByUserId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'users',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'biometric_imports',
                      'periodFrom',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'biometric_imports',
                      'periodTo',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'leave_types',
                      'code',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'leave_types',
                      'name',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'leave_types',
                      'daysPerYear',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'leave_types',
                      'isConvertible',
                      {
                          type: Sequelize.DataTypes.BOOLEAN,
                          
                            defaultValue: false,
                            allowNull: false,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'leave_types',
                      'requiresMedCert',
                      {
                          type: Sequelize.DataTypes.BOOLEAN,
                          
                            defaultValue: false,
                            allowNull: false,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'leave_types',
                      'minServiceMonths',
                      {
                          type: Sequelize.DataTypes.INTEGER,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'leave_types',
                      'isActive',
                      {
                          type: Sequelize.DataTypes.BOOLEAN,
                          
                            defaultValue: false,
                            allowNull: false,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'leave_balances',
                      'employeeId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'employees',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'leave_balances',
                      'leaveTypeId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'leave_types',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'leave_balances',
                      'year',
                      {
                          type: Sequelize.DataTypes.INTEGER,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'leave_balances',
                      'openingBalance',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'leave_balances',
                      'earnedThisYear',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'leave_balances',
                      'usedYtd',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'leave_balances',
                      'forfeited',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'leave_balances',
                      'convertedToCash',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'leave_balances',
                      'currentBalance',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'leave_applications',
                      'employeeId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'employees',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'leave_applications',
                      'leaveTypeId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'leave_types',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'leave_applications',
                      'dateFrom',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'leave_applications',
                      'dateTo',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'leave_applications',
                      'totalDays',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'leave_applications',
                      'reason',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'leave_applications',
                      'status',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['APPLIED','PENDING_MANAGER','PENDING_HR','APPROVED','REJECTED','CANCELLED'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'leave_applications',
                      'managerNote',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'leave_applications',
                      'hrNote',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'leave_applications',
                      'approvedByUserId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'users',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'leave_applications',
                      'approvedAt',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'employee_loans',
                      'employeeId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'employees',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'employee_loans',
                      'loanType',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['SSS','PAG_IBIG','COMPANY','SALARY'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'employee_loans',
                      'loanSource',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'employee_loans',
                      'loanAmount',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'employee_loans',
                      'approvalDate',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'employee_loans',
                      'firstDeductionDate',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'employee_loans',
                      'monthlyAmortization',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'employee_loans',
                      'remainingBalance',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'employee_loans',
                      'termsMonths',
                      {
                          type: Sequelize.DataTypes.INTEGER,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'employee_loans',
                      'status',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['ACTIVE','FULLY_PAID','CANCELLED','DEFERRED'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'employee_loans',
                      'loanAccountNumber',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'loan_deductions',
                      'loanId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'employee_loans',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'loan_deductions',
                      'payrollItemId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'payroll_items',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'loan_deductions',
                      'amountDeducted',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'loan_deductions',
                      'deductionDate',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'loan_deductions',
                      'balanceBefore',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'loan_deductions',
                      'balanceAfter',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'loan_deductions',
                      'isDeferred',
                      {
                          type: Sequelize.DataTypes.BOOLEAN,
                          
                            defaultValue: false,
                            allowNull: false,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'loan_deductions',
                      'deferredReason',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'payroll_runs',
                      'periodFrom',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'payroll_runs',
                      'periodTo',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'payroll_runs',
                      'payrollType',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['SEMI_MONTHLY_1','SEMI_MONTHLY_2','THIRTEENTH_MONTH','FINAL_PAY','ADJUSTMENT'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'payroll_runs',
                      'status',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['DRAFT','COMPUTED','APPROVED','POSTED','VOIDED'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'payroll_runs',
                      'lockedAt',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'payroll_runs',
                      'computedAt',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'payroll_runs',
                      'approvedAt',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'payroll_runs',
                      'postedAt',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'payroll_runs',
                      'approvedByUserId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'users',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'payroll_runs',
                      'postedByUserId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'users',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'payroll_runs',
                      'notes',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'payroll_runs',
                      'journalEntryId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'journal_entries',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'payroll_items',
                      'payrollRunId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'payroll_runs',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'payroll_items',
                      'employeeId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'employees',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'payroll_items',
                      'regularDaysWorked',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'payroll_items',
                      'absentDays',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'payroll_items',
                      'tardinessMinutes',
                      {
                          type: Sequelize.DataTypes.INTEGER,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'payroll_items',
                      'overtimeHours',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'payroll_items',
                      'nightDiffHours',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'payroll_items',
                      'holidayDaysWorked',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'payroll_items',
                      'basicPay',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'payroll_items',
                      'overtimePay',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'payroll_items',
                      'nightDifferential',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'payroll_items',
                      'holidayPay',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'payroll_items',
                      'allowances',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'payroll_items',
                      'otherEarnings',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'payroll_items',
                      'grossPay',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'payroll_items',
                      'sssEmployee',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'payroll_items',
                      'philhealthEmployee',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'payroll_items',
                      'pagibigEmployee',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'payroll_items',
                      'withholdingTax',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'payroll_items',
                      'sssEmployer',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'payroll_items',
                      'philhealthEmployer',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'payroll_items',
                      'pagibigEmployer',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'payroll_items',
                      'sssLoanDeduction',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'payroll_items',
                      'pagibigLoanDeduction',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'payroll_items',
                      'companyLoanDeduction',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'payroll_items',
                      'otherDeductions',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'payroll_items',
                      'totalDeductions',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'payroll_items',
                      'netPay',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'payroll_items',
                      'ytdGrossPay',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'payroll_items',
                      'ytdWithholdingTax',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'payroll_items',
                      'ytdSssEmployee',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'payroll_items',
                      'ytdPhilhealthEmployee',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'payroll_items',
                      'ytdPagibigEmployee',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'payroll_items',
                      'ytdBasicPay',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'payroll_items',
                      'payslipHash',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
            
                
                    
                    await queryInterface.addColumn(
                      'bank_files',
                      'payrollRunId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'payroll_runs',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'bank_files',
                      'bankCode',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['BDO','BPI','METROBANK','PNB','RCBC','UNIONBANK'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'bank_files',
                      'fileFormat',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['CSV','TXT','XLSX'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
            
                
                    
                    await queryInterface.addColumn(
                      'bank_files',
                      'totalAmount',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'bank_files',
                      'recordCount',
                      {
                          type: Sequelize.DataTypes.INTEGER,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'bank_files',
                      'generatedByUserId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'users',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'bank_files',
                      'generatedAt',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'bank_files',
                      'submittedAt',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'bank_files',
                      'fileHash',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'accounts',
                      'code',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'accounts',
                      'name',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'accounts',
                      'accountType',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['ASSET','LIABILITY','EQUITY','REVENUE','COST_OF_SALES','EXPENSE','OTHER_INCOME','OTHER_EXPENSE'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'accounts',
                      'parentId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'accounts',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'accounts',
                      'isHeader',
                      {
                          type: Sequelize.DataTypes.BOOLEAN,
                          
                            defaultValue: false,
                            allowNull: false,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'accounts',
                      'normalBalance',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['DEBIT','CREDIT'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'accounts',
                      'isActive',
                      {
                          type: Sequelize.DataTypes.BOOLEAN,
                          
                            defaultValue: false,
                            allowNull: false,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'accounts',
                      'description',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'journal_entries',
                      'entryNumber',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'journal_entries',
                      'entryDate',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'journal_entries',
                      'journalType',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['JV_PAYROLL','JV_AP','JV_AR','JV_ADJUSTMENT','JV_CLOSING','JV_BANK','JV_REVERSAL'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'journal_entries',
                      'status',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['DRAFT','POSTED','REVERSED'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'journal_entries',
                      'description',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'journal_entries',
                      'reference',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'journal_entries',
                      'payrollRunId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'payroll_runs',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'journal_entries',
                      'reversalOfEntryId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'journal_entries',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'journal_entries',
                      'postedAt',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'journal_entries',
                      'postedByUserId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'users',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'journal_lines',
                      'journalEntryId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'journal_entries',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'journal_lines',
                      'accountId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'accounts',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'journal_lines',
                      'costCenterId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'cost_centers',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'journal_lines',
                      'description',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'journal_lines',
                      'debit',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'journal_lines',
                      'credit',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'journal_lines',
                      'lineOrder',
                      {
                          type: Sequelize.DataTypes.INTEGER,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'vendors',
                      'vendorCode',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'vendors',
                      'vendorName',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'vendors',
                      'vendorType',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['SUPPLIER','SERVICE_PROVIDER','CONTRACTOR','GOVERNMENT'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'vendors',
                      'taxClassification',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['VAT_REGISTERED','NON_VAT','GOVERNMENT'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'vendors',
                      'tinNumber',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'vendors',
                      'birRegAddress',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'vendors',
                      'contactPerson',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'vendors',
                      'contactNumber',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'vendors',
                      'email',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'vendors',
                      'address',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'vendors',
                      'paymentTermsDays',
                      {
                          type: Sequelize.DataTypes.INTEGER,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'vendors',
                      'defaultAccountId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'accounts',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'vendors',
                      'wtaxAtcCode',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'vendors',
                      'wtaxRate',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'vendors',
                      'bankName',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'vendors',
                      'bankAccountNumber',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'vendors',
                      'bankAccountName',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'vendors',
                      'isActive',
                      {
                          type: Sequelize.DataTypes.BOOLEAN,
                          
                            defaultValue: false,
                            allowNull: false,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'ap_invoices',
                      'invoiceNumber',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'ap_invoices',
                      'vendorId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'vendors',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'ap_invoices',
                      'vendorInvoiceNumber',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'ap_invoices',
                      'invoiceDate',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'ap_invoices',
                      'receiptDate',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'ap_invoices',
                      'dueDate',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'ap_invoices',
                      'grossAmount',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'ap_invoices',
                      'vatAmount',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'ap_invoices',
                      'ewtAmount',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'ap_invoices',
                      'netPayable',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'ap_invoices',
                      'description',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'ap_invoices',
                      'glAccountId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'accounts',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'ap_invoices',
                      'costCenterId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'cost_centers',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'ap_invoices',
                      'status',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['UNPOSTED','POSTED','PARTIALLY_PAID','FULLY_PAID','OVERDUE','CANCELLED'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'ap_invoices',
                      'journalEntryId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'journal_entries',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'ap_payments',
                      'paymentDate',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'ap_payments',
                      'paymentMode',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['CHECK','BANK_TRANSFER','CASH','PDC'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'ap_payments',
                      'checkNumber',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'ap_payments',
                      'bankName',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'ap_payments',
                      'totalAmount',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'ap_payments',
                      'createdByUserId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'users',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'ap_payments',
                      'approvedByUserId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'users',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
            
                
                    
                    await queryInterface.addColumn(
                      'ap_payment_lines',
                      'paymentId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'ap_payments',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'ap_payment_lines',
                      'invoiceId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'ap_invoices',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'ap_payment_lines',
                      'amountPaid',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'customers',
                      'customerCode',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'customers',
                      'customerName',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'customers',
                      'customerType',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'customers',
                      'tinNumber',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'customers',
                      'creditLimit',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'customers',
                      'paymentTerms',
                      {
                          type: Sequelize.DataTypes.INTEGER,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'customers',
                      'contactPerson',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'customers',
                      'billingAddress',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'customers',
                      'onCreditHold',
                      {
                          type: Sequelize.DataTypes.BOOLEAN,
                          
                            defaultValue: false,
                            allowNull: false,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'customers',
                      'isActive',
                      {
                          type: Sequelize.DataTypes.BOOLEAN,
                          
                            defaultValue: false,
                            allowNull: false,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'ar_invoices',
                      'invoiceNumber',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'ar_invoices',
                      'customerId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'customers',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'ar_invoices',
                      'invoiceDate',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'ar_invoices',
                      'dueDate',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'ar_invoices',
                      'subtotal',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'ar_invoices',
                      'vatAmount',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'ar_invoices',
                      'totalAmountDue',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'ar_invoices',
                      'collectedAmount',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'ar_invoices',
                      'outstandingBalance',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'ar_invoices',
                      'status',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['OPEN','PARTIALLY_COLLECTED','FULLY_COLLECTED','OVERDUE','WRITTEN_OFF'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'ar_invoice_items',
                      'invoiceId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'ar_invoices',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'ar_invoice_items',
                      'description',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'ar_invoice_items',
                      'quantity',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'ar_invoice_items',
                      'unitPrice',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'ar_invoice_items',
                      'lineTotal',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'job_requisitions',
                      'requestingDept',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'job_requisitions',
                      'positionTitle',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'job_requisitions',
                      'numberOfVacancies',
                      {
                          type: Sequelize.DataTypes.INTEGER,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'job_requisitions',
                      'justification',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'job_requisitions',
                      'requiredSkills',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'job_requisitions',
                      'salaryRangeFrom',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'job_requisitions',
                      'salaryRangeTo',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'job_requisitions',
                      'targetStartDate',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'job_requisitions',
                      'status',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['JOB_REQUEST','APPROVAL','POSTED','APPLICATIONS','SCREENING','INTERVIEW','JOB_OFFER','PRE_EMPLOYMENT','ONBOARDING','ACTIVE'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'job_requisitions',
                      'approvedByManagerUserId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'users',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'job_requisitions',
                      'approvedByHrUserId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'users',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'applicants',
                      'jobRequisitionId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'job_requisitions',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'applicants',
                      'applicationDate',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'applicants',
                      'firstName',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'applicants',
                      'lastName',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'applicants',
                      'email',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'applicants',
                      'mobile',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'applicants',
                      'source',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['WALK_IN','REFERRAL','JOB_BOARD','INTERNAL'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
            
                
                    
                    await queryInterface.addColumn(
                      'applicants',
                      'interviewSchedule',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'applicants',
                      'interviewResult',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['PASS','FAIL','SECOND_INTERVIEW','PENDING'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'applicants',
                      'psychTestResult',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'applicants',
                      'medicalResult',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'applicants',
                      'backgroundCheck',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'applicants',
                      'jobOfferStatus',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['PENDING','ACCEPTED','DECLINED'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'applicants',
                      'expectedStartDate',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'applicants',
                      'convertedEmployeeId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'employees',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'approval_requests',
                      'requestType',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['AP_PAYMENT','SALARY_CHANGE','JOURNAL_ENTRY','EXPORT_REQUEST','PAYROLL_POST','LOAN_APPROVAL'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'approval_requests',
                      'entityId',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'approval_requests',
                      'entityType',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'approval_requests',
                      'status',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['PENDING','APPROVED','REJECTED','CANCELLED','EXPIRED'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'approval_requests',
                      'requestedByUserId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'users',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'approval_requests',
                      'requestedAt',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'approval_requests',
                      'approvedByUserId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'users',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'approval_requests',
                      'approvedAt',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'approval_requests',
                      'rejectedByUserId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'users',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'approval_requests',
                      'rejectedAt',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'approval_requests',
                      'rejectionReason',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'approval_requests',
                      'amount',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'approval_requests',
                      'notes',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'notifications',
                      'userId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'users',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'notifications',
                      'type',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['LEAVE_APPROVED','LEAVE_REJECTED','LEAVE_PENDING','PAYSLIP_READY','LOAN_BALANCE_LOW','LOAN_FULLY_PAID','AP_OVERDUE','AP_DUE_SOON','PAYROLL_READY_FOR_APPROVAL','PAYROLL_POSTED','PROBATION_ENDING','PASSWORD_EXPIRING','ACCOUNT_LOCKED','APPROVAL_REQUIRED','APPROVAL_COMPLETED','SYSTEM_BACKUP_FAILED','GOVERNMENT_DEADLINE_REMINDER'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'notifications',
                      'title',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'notifications',
                      'message',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'notifications',
                      'link',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'notifications',
                      'isRead',
                      {
                          type: Sequelize.DataTypes.BOOLEAN,
                          
                            defaultValue: false,
                            allowNull: false,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'notifications',
                      'readAt',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'notifications',
                      'sentAt',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'export_requests',
                      'requestedByUserId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'users',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'export_requests',
                      'exportType',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'export_requests',
                      'filtersJson',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'export_requests',
                      'recordCount',
                      {
                          type: Sequelize.DataTypes.INTEGER,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'export_requests',
                      'status',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['PENDING','APPROVED','REJECTED','CANCELLED','EXPIRED'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'export_requests',
                      'approvedByUserId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'users',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'export_requests',
                      'approvedAt',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
            
                
                    
                    await queryInterface.addColumn(
                      'export_requests',
                      'expiresAt',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'password_histories',
                      'userId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'users',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'password_histories',
                      'passwordHash',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'password_histories',
                      'recordedAt',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'refresh_tokens',
                      'userId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'users',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'refresh_tokens',
                      'tokenHash',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'refresh_tokens',
                      'expiresAt',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'refresh_tokens',
                      'isRevoked',
                      {
                          type: Sequelize.DataTypes.BOOLEAN,
                          
                            defaultValue: false,
                            allowNull: false,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'refresh_tokens',
                      'ipAddress',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'refresh_tokens',
                      'userAgent',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'refresh_tokens',
                      'issuedAt',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'audit_logs',
                      'userId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'users',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'audit_logs',
                      'action',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['CREATE','UPDATE','DELETE','LOGIN','LOGOUT','LOGIN_FAILED','POST','VOID','APPROVE','REJECT'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'audit_logs',
                      'module',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'audit_logs',
                      'entityId',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'audit_logs',
                      'entityType',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'audit_logs',
                      'oldValueJson',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'audit_logs',
                      'newValueJson',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'audit_logs',
                      'ipAddress',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'audit_logs',
                      'description',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'audit_logs',
                      'eventAt',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { 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(
                        'audit_logs',
                        'eventAt',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'audit_logs',
                        'description',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'audit_logs',
                        'ipAddress',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'audit_logs',
                        'newValueJson',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'audit_logs',
                        'oldValueJson',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'audit_logs',
                        'entityType',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'audit_logs',
                        'entityId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'audit_logs',
                        'module',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'audit_logs',
                        'action',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'audit_logs',
                        'userId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'refresh_tokens',
                        'issuedAt',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'refresh_tokens',
                        'userAgent',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'refresh_tokens',
                        'ipAddress',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'refresh_tokens',
                        'isRevoked',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'refresh_tokens',
                        'expiresAt',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'refresh_tokens',
                        'tokenHash',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'refresh_tokens',
                        'userId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'password_histories',
                        'recordedAt',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'password_histories',
                        'passwordHash',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'password_histories',
                        'userId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'export_requests',
                        'expiresAt',
                        { transaction }
                    );
                
            
                
            
                
                    await queryInterface.removeColumn(
                        'export_requests',
                        'approvedAt',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'export_requests',
                        'approvedByUserId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'export_requests',
                        'status',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'export_requests',
                        'recordCount',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'export_requests',
                        'filtersJson',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'export_requests',
                        'exportType',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'export_requests',
                        'requestedByUserId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'notifications',
                        'sentAt',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'notifications',
                        'readAt',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'notifications',
                        'isRead',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'notifications',
                        'link',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'notifications',
                        'message',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'notifications',
                        'title',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'notifications',
                        'type',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'notifications',
                        'userId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'approval_requests',
                        'notes',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'approval_requests',
                        'amount',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'approval_requests',
                        'rejectionReason',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'approval_requests',
                        'rejectedAt',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'approval_requests',
                        'rejectedByUserId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'approval_requests',
                        'approvedAt',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'approval_requests',
                        'approvedByUserId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'approval_requests',
                        'requestedAt',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'approval_requests',
                        'requestedByUserId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'approval_requests',
                        'status',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'approval_requests',
                        'entityType',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'approval_requests',
                        'entityId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'approval_requests',
                        'requestType',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'applicants',
                        'convertedEmployeeId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'applicants',
                        'expectedStartDate',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'applicants',
                        'jobOfferStatus',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'applicants',
                        'backgroundCheck',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'applicants',
                        'medicalResult',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'applicants',
                        'psychTestResult',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'applicants',
                        'interviewResult',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'applicants',
                        'interviewSchedule',
                        { transaction }
                    );
                
            
                
            
                
                    await queryInterface.removeColumn(
                        'applicants',
                        'source',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'applicants',
                        'mobile',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'applicants',
                        'email',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'applicants',
                        'lastName',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'applicants',
                        'firstName',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'applicants',
                        'applicationDate',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'applicants',
                        'jobRequisitionId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'job_requisitions',
                        'approvedByHrUserId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'job_requisitions',
                        'approvedByManagerUserId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'job_requisitions',
                        'status',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'job_requisitions',
                        'targetStartDate',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'job_requisitions',
                        'salaryRangeTo',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'job_requisitions',
                        'salaryRangeFrom',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'job_requisitions',
                        'requiredSkills',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'job_requisitions',
                        'justification',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'job_requisitions',
                        'numberOfVacancies',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'job_requisitions',
                        'positionTitle',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'job_requisitions',
                        'requestingDept',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'ar_invoice_items',
                        'lineTotal',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'ar_invoice_items',
                        'unitPrice',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'ar_invoice_items',
                        'quantity',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'ar_invoice_items',
                        'description',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'ar_invoice_items',
                        'invoiceId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'ar_invoices',
                        'status',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'ar_invoices',
                        'outstandingBalance',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'ar_invoices',
                        'collectedAmount',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'ar_invoices',
                        'totalAmountDue',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'ar_invoices',
                        'vatAmount',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'ar_invoices',
                        'subtotal',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'ar_invoices',
                        'dueDate',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'ar_invoices',
                        'invoiceDate',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'ar_invoices',
                        'customerId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'ar_invoices',
                        'invoiceNumber',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'customers',
                        'isActive',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'customers',
                        'onCreditHold',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'customers',
                        'billingAddress',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'customers',
                        'contactPerson',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'customers',
                        'paymentTerms',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'customers',
                        'creditLimit',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'customers',
                        'tinNumber',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'customers',
                        'customerType',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'customers',
                        'customerName',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'customers',
                        'customerCode',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'ap_payment_lines',
                        'amountPaid',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'ap_payment_lines',
                        'invoiceId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'ap_payment_lines',
                        'paymentId',
                        { transaction }
                    );
                
            
                
            
                
                    await queryInterface.removeColumn(
                        'ap_payments',
                        'approvedByUserId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'ap_payments',
                        'createdByUserId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'ap_payments',
                        'totalAmount',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'ap_payments',
                        'bankName',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'ap_payments',
                        'checkNumber',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'ap_payments',
                        'paymentMode',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'ap_payments',
                        'paymentDate',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'ap_invoices',
                        'journalEntryId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'ap_invoices',
                        'status',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'ap_invoices',
                        'costCenterId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'ap_invoices',
                        'glAccountId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'ap_invoices',
                        'description',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'ap_invoices',
                        'netPayable',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'ap_invoices',
                        'ewtAmount',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'ap_invoices',
                        'vatAmount',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'ap_invoices',
                        'grossAmount',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'ap_invoices',
                        'dueDate',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'ap_invoices',
                        'receiptDate',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'ap_invoices',
                        'invoiceDate',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'ap_invoices',
                        'vendorInvoiceNumber',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'ap_invoices',
                        'vendorId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'ap_invoices',
                        'invoiceNumber',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'vendors',
                        'isActive',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'vendors',
                        'bankAccountName',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'vendors',
                        'bankAccountNumber',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'vendors',
                        'bankName',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'vendors',
                        'wtaxRate',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'vendors',
                        'wtaxAtcCode',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'vendors',
                        'defaultAccountId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'vendors',
                        'paymentTermsDays',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'vendors',
                        'address',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'vendors',
                        'email',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'vendors',
                        'contactNumber',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'vendors',
                        'contactPerson',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'vendors',
                        'birRegAddress',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'vendors',
                        'tinNumber',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'vendors',
                        'taxClassification',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'vendors',
                        'vendorType',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'vendors',
                        'vendorName',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'vendors',
                        'vendorCode',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'journal_lines',
                        'lineOrder',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'journal_lines',
                        'credit',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'journal_lines',
                        'debit',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'journal_lines',
                        'description',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'journal_lines',
                        'costCenterId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'journal_lines',
                        'accountId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'journal_lines',
                        'journalEntryId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'journal_entries',
                        'postedByUserId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'journal_entries',
                        'postedAt',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'journal_entries',
                        'reversalOfEntryId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'journal_entries',
                        'payrollRunId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'journal_entries',
                        'reference',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'journal_entries',
                        'description',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'journal_entries',
                        'status',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'journal_entries',
                        'journalType',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'journal_entries',
                        'entryDate',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'journal_entries',
                        'entryNumber',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'accounts',
                        'description',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'accounts',
                        'isActive',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'accounts',
                        'normalBalance',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'accounts',
                        'isHeader',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'accounts',
                        'parentId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'accounts',
                        'accountType',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'accounts',
                        'name',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'accounts',
                        'code',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'bank_files',
                        'fileHash',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'bank_files',
                        'submittedAt',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'bank_files',
                        'generatedAt',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'bank_files',
                        'generatedByUserId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'bank_files',
                        'recordCount',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'bank_files',
                        'totalAmount',
                        { transaction }
                    );
                
            
                
            
                
                    await queryInterface.removeColumn(
                        'bank_files',
                        'fileFormat',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'bank_files',
                        'bankCode',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'bank_files',
                        'payrollRunId',
                        { transaction }
                    );
                
            
                
            
                
                    await queryInterface.removeColumn(
                        'payroll_items',
                        'payslipHash',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'payroll_items',
                        'ytdBasicPay',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'payroll_items',
                        'ytdPagibigEmployee',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'payroll_items',
                        'ytdPhilhealthEmployee',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'payroll_items',
                        'ytdSssEmployee',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'payroll_items',
                        'ytdWithholdingTax',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'payroll_items',
                        'ytdGrossPay',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'payroll_items',
                        'netPay',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'payroll_items',
                        'totalDeductions',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'payroll_items',
                        'otherDeductions',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'payroll_items',
                        'companyLoanDeduction',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'payroll_items',
                        'pagibigLoanDeduction',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'payroll_items',
                        'sssLoanDeduction',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'payroll_items',
                        'pagibigEmployer',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'payroll_items',
                        'philhealthEmployer',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'payroll_items',
                        'sssEmployer',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'payroll_items',
                        'withholdingTax',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'payroll_items',
                        'pagibigEmployee',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'payroll_items',
                        'philhealthEmployee',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'payroll_items',
                        'sssEmployee',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'payroll_items',
                        'grossPay',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'payroll_items',
                        'otherEarnings',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'payroll_items',
                        'allowances',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'payroll_items',
                        'holidayPay',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'payroll_items',
                        'nightDifferential',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'payroll_items',
                        'overtimePay',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'payroll_items',
                        'basicPay',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'payroll_items',
                        'holidayDaysWorked',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'payroll_items',
                        'nightDiffHours',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'payroll_items',
                        'overtimeHours',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'payroll_items',
                        'tardinessMinutes',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'payroll_items',
                        'absentDays',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'payroll_items',
                        'regularDaysWorked',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'payroll_items',
                        'employeeId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'payroll_items',
                        'payrollRunId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'payroll_runs',
                        'journalEntryId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'payroll_runs',
                        'notes',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'payroll_runs',
                        'postedByUserId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'payroll_runs',
                        'approvedByUserId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'payroll_runs',
                        'postedAt',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'payroll_runs',
                        'approvedAt',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'payroll_runs',
                        'computedAt',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'payroll_runs',
                        'lockedAt',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'payroll_runs',
                        'status',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'payroll_runs',
                        'payrollType',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'payroll_runs',
                        'periodTo',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'payroll_runs',
                        'periodFrom',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'loan_deductions',
                        'deferredReason',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'loan_deductions',
                        'isDeferred',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'loan_deductions',
                        'balanceAfter',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'loan_deductions',
                        'balanceBefore',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'loan_deductions',
                        'deductionDate',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'loan_deductions',
                        'amountDeducted',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'loan_deductions',
                        'payrollItemId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'loan_deductions',
                        'loanId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'employee_loans',
                        'loanAccountNumber',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'employee_loans',
                        'status',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'employee_loans',
                        'termsMonths',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'employee_loans',
                        'remainingBalance',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'employee_loans',
                        'monthlyAmortization',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'employee_loans',
                        'firstDeductionDate',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'employee_loans',
                        'approvalDate',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'employee_loans',
                        'loanAmount',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'employee_loans',
                        'loanSource',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'employee_loans',
                        'loanType',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'employee_loans',
                        'employeeId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'leave_applications',
                        'approvedAt',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'leave_applications',
                        'approvedByUserId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'leave_applications',
                        'hrNote',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'leave_applications',
                        'managerNote',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'leave_applications',
                        'status',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'leave_applications',
                        'reason',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'leave_applications',
                        'totalDays',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'leave_applications',
                        'dateTo',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'leave_applications',
                        'dateFrom',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'leave_applications',
                        'leaveTypeId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'leave_applications',
                        'employeeId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'leave_balances',
                        'currentBalance',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'leave_balances',
                        'convertedToCash',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'leave_balances',
                        'forfeited',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'leave_balances',
                        'usedYtd',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'leave_balances',
                        'earnedThisYear',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'leave_balances',
                        'openingBalance',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'leave_balances',
                        'year',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'leave_balances',
                        'leaveTypeId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'leave_balances',
                        'employeeId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'leave_types',
                        'isActive',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'leave_types',
                        'minServiceMonths',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'leave_types',
                        'requiresMedCert',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'leave_types',
                        'isConvertible',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'leave_types',
                        'daysPerYear',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'leave_types',
                        'name',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'leave_types',
                        'code',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'biometric_imports',
                        'periodTo',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'biometric_imports',
                        'periodFrom',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'biometric_imports',
                        'importedByUserId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'biometric_imports',
                        'errorDetailsJson',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'biometric_imports',
                        'errorCount',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'biometric_imports',
                        'successCount',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'biometric_imports',
                        'totalRecords',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'biometric_imports',
                        'fileName',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'biometric_imports',
                        'deviceCode',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'biometric_imports',
                        'importDate',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'time_records',
                        'payrollRunId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'time_records',
                        'approvedAt',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'time_records',
                        'approvedByUserId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'time_records',
                        'modificationReason',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'time_records',
                        'modifiedByUserId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'time_records',
                        'source',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'time_records',
                        'halfDayType',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'time_records',
                        'isHalfDay',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'time_records',
                        'isAbsent',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'time_records',
                        'workType',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'time_records',
                        'nightDiffHours',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'time_records',
                        'overtimeMinutes',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'time_records',
                        'undertimeMinutes',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'time_records',
                        'tardinessMinutes',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'time_records',
                        'actualTimeOut',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'time_records',
                        'actualTimeIn',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'time_records',
                        'scheduledTimeOut',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'time_records',
                        'scheduledTimeIn',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'time_records',
                        'workDate',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'time_records',
                        'shiftId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'time_records',
                        'employeeId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'employee_documents',
                        'uploadedByUserId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'employee_documents',
                        'uploadedAt',
                        { transaction }
                    );
                
            
                
            
                
                    await queryInterface.removeColumn(
                        'employee_documents',
                        'fileName',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'employee_documents',
                        'documentType',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'employee_documents',
                        'employeeId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'employees',
                        'reportingToId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'employees',
                        'shiftId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'employees',
                        'positionId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'employees',
                        'departmentId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'employees',
                        'isActive',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'employees',
                        'finalPayReleasedDate',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'employees',
                        'finalPayAmount',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'employees',
                        'clearanceStatus',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'employees',
                        'separationReason',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'employees',
                        'separationType',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'employees',
                        'separationDate',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'employees',
                        'workLocation',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'employees',
                        'taxStatus',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'employees',
                        'basicSalary',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'employees',
                        'salaryType',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'employees',
                        'jobLevel',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'employees',
                        'employmentType',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'employees',
                        'employmentStatus',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'employees',
                        'regularizationDate',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'employees',
                        'employmentDate',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'employees',
                        'bankAccountName',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'employees',
                        'bankAccountNumber',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'employees',
                        'bankName',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'employees',
                        'tinNumber',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'employees',
                        'pagibigNumber',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'employees',
                        'philhealthNumber',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'employees',
                        'sssNumber',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'employees',
                        'emergencyContactMobile',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'employees',
                        'emergencyContactRel',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'employees',
                        'emergencyContactName',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'employees',
                        'personalMobile',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'employees',
                        'personalEmail',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'employees',
                        'permanentZipCode',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'employees',
                        'permanentProvince',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'employees',
                        'permanentCity',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'employees',
                        'permanentBarangay',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'employees',
                        'permanentStreet',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'employees',
                        'permanentAddressSame',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'employees',
                        'homeZipCode',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'employees',
                        'homeProvince',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'employees',
                        'homeCity',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'employees',
                        'homeBarangay',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'employees',
                        'homeStreet',
                        { transaction }
                    );
                
            
                
            
                
                    await queryInterface.removeColumn(
                        'employees',
                        'bloodType',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'employees',
                        'religion',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'employees',
                        'nationality',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'employees',
                        'civilStatus',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'employees',
                        'sex',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'employees',
                        'placeOfBirth',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'employees',
                        'dateOfBirth',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'employees',
                        'nameExtension',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'employees',
                        'lastName',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'employees',
                        'middleName',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'employees',
                        'firstName',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'employees',
                        'employeeCode',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'shifts',
                        'isActive',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'shifts',
                        'rotationCycleDays',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'shifts',
                        'isRotating',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'shifts',
                        'totalWorkingHours',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'shifts',
                        'breakDurationMinutes',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'shifts',
                        'timeOut',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'shifts',
                        'timeIn',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'shifts',
                        'name',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'positions',
                        'isActive',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'positions',
                        'jobLevel',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'positions',
                        'title',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'departments',
                        'isActive',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'departments',
                        'costCenterId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'departments',
                        'name',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'departments',
                        'code',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'cost_centers',
                        'isActive',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'cost_centers',
                        'name',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'cost_centers',
                        'code',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'fiscal_periods',
                        'lockedByUserId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'fiscal_periods',
                        'lockedAt',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'fiscal_periods',
                        'closedByUserId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'fiscal_periods',
                        'closedAt',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'fiscal_periods',
                        'openedAt',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'fiscal_periods',
                        'status',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'fiscal_periods',
                        'month',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'fiscal_periods',
                        'year',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'withholding_tax_tables',
                        'effectiveYear',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'withholding_tax_tables',
                        'excessOver',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'withholding_tax_tables',
                        'excessRate',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'withholding_tax_tables',
                        'baseTax',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'withholding_tax_tables',
                        'salaryTo',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'withholding_tax_tables',
                        'salaryFrom',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'withholding_tax_tables',
                        'periodType',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'sss_contribution_tables',
                        'effectiveYear',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'sss_contribution_tables',
                        'wispEmployer',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'sss_contribution_tables',
                        'wispEmployee',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'sss_contribution_tables',
                        'employerShare',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'sss_contribution_tables',
                        'employeeShare',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'sss_contribution_tables',
                        'msc',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'sss_contribution_tables',
                        'salaryTo',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'sss_contribution_tables',
                        'salaryFrom',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'holidays',
                        'isRecurring',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'holidays',
                        'year',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'holidays',
                        'holidayType',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'holidays',
                        'holidayName',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'holidays',
                        'holidayDate',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'system_parameters',
                        'lastUpdatedByUserId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'system_parameters',
                        'lastUpdatedAt',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'system_parameters',
                        'description',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'system_parameters',
                        'value',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'system_parameters',
                        'key',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'permissions',
                        'name',
                        { transaction }
                    );
                
            
                
            
                
                    await queryInterface.removeColumn(
                        'roles',
                        'role_customization',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'roles',
                        'name',
                        { transaction }
                    );
                
            
                
            
                
                    await queryInterface.removeColumn(
                        'users',
                        'app_roleId',
                        { 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('audit_logs', { transaction });
                
            
                
                    await queryInterface.dropTable('refresh_tokens', { transaction });
                
            
                
                    await queryInterface.dropTable('password_histories', { transaction });
                
            
                
                    await queryInterface.dropTable('export_requests', { transaction });
                
            
                
                    await queryInterface.dropTable('notifications', { transaction });
                
            
                
                    await queryInterface.dropTable('approval_requests', { transaction });
                
            
                
                    await queryInterface.dropTable('applicants', { transaction });
                
            
                
                    await queryInterface.dropTable('job_requisitions', { transaction });
                
            
                
                    await queryInterface.dropTable('ar_invoice_items', { transaction });
                
            
                
                    await queryInterface.dropTable('ar_invoices', { transaction });
                
            
                
                    await queryInterface.dropTable('customers', { transaction });
                
            
                
                    await queryInterface.dropTable('ap_payment_lines', { transaction });
                
            
                
                    await queryInterface.dropTable('ap_payments', { transaction });
                
            
                
                    await queryInterface.dropTable('ap_invoices', { transaction });
                
            
                
                    await queryInterface.dropTable('vendors', { transaction });
                
            
                
                    await queryInterface.dropTable('journal_lines', { transaction });
                
            
                
                    await queryInterface.dropTable('journal_entries', { transaction });
                
            
                
                    await queryInterface.dropTable('accounts', { transaction });
                
            
                
                    await queryInterface.dropTable('bank_files', { transaction });
                
            
                
                    await queryInterface.dropTable('payroll_items', { transaction });
                
            
                
                    await queryInterface.dropTable('payroll_runs', { transaction });
                
            
                
                    await queryInterface.dropTable('loan_deductions', { transaction });
                
            
                
                    await queryInterface.dropTable('employee_loans', { transaction });
                
            
                
                    await queryInterface.dropTable('leave_applications', { transaction });
                
            
                
                    await queryInterface.dropTable('leave_balances', { transaction });
                
            
                
                    await queryInterface.dropTable('leave_types', { transaction });
                
            
                
                    await queryInterface.dropTable('biometric_imports', { transaction });
                
            
                
                    await queryInterface.dropTable('time_records', { transaction });
                
            
                
                    await queryInterface.dropTable('employee_documents', { transaction });
                
            
                
                    await queryInterface.dropTable('employees', { transaction });
                
            
                
                    await queryInterface.dropTable('shifts', { transaction });
                
            
                
                    await queryInterface.dropTable('positions', { transaction });
                
            
                
                    await queryInterface.dropTable('departments', { transaction });
                
            
                
                    await queryInterface.dropTable('cost_centers', { transaction });
                
            
                
                    await queryInterface.dropTable('fiscal_periods', { transaction });
                
            
                
                    await queryInterface.dropTable('withholding_tax_tables', { transaction });
                
            
                
                    await queryInterface.dropTable('sss_contribution_tables', { transaction });
                
            
                
                    await queryInterface.dropTable('holidays', { transaction });
                
            
                
                    await queryInterface.dropTable('system_parameters', { transaction });
                
            
                
                    await queryInterface.dropTable('permissions', { transaction });
                
            
                
                    await queryInterface.dropTable('roles', { transaction });
                
            
                
                    await queryInterface.dropTable('users', { transaction });
                
            
            await transaction.commit();
        } catch (err) {
            await transaction.rollback();
            throw err;
        }
    }
};
