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('organizations', {
                        id: {
                            type: Sequelize.DataTypes.UUID,
                            defaultValue: Sequelize.DataTypes.UUIDV4,
                            primaryKey: true,
                        },
                        createdById: {
                            type: Sequelize.DataTypes.UUID,
                            references: {
                                key: 'id',
                                model: 'users',
                            },
                        },
                        updatedById: {
                            type: Sequelize.DataTypes.UUID,
                            references: {
                                key: 'id',
                                model: 'users',
                            },
                        },
                        createdAt: { type: Sequelize.DataTypes.DATE },
                        updatedAt: { type: Sequelize.DataTypes.DATE },
                        deletedAt: { type: Sequelize.DataTypes.DATE },
                        importHash: {
                            type: Sequelize.DataTypes.STRING(255),
                            allowNull: true,
                          unique: true, 
                        },
                    }, { transaction });
                
            
                
                    await queryInterface.createTable('provinces', {
                        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('role_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('approval_workflows', {
                        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_steps', {
                        id: {
                            type: Sequelize.DataTypes.UUID,
                            defaultValue: Sequelize.DataTypes.UUIDV4,
                            primaryKey: true,
                        },
                        createdById: {
                            type: Sequelize.DataTypes.UUID,
                            references: {
                                key: 'id',
                                model: 'users',
                            },
                        },
                        updatedById: {
                            type: Sequelize.DataTypes.UUID,
                            references: {
                                key: 'id',
                                model: 'users',
                            },
                        },
                        createdAt: { type: Sequelize.DataTypes.DATE },
                        updatedAt: { type: Sequelize.DataTypes.DATE },
                        deletedAt: { type: Sequelize.DataTypes.DATE },
                        importHash: {
                            type: Sequelize.DataTypes.STRING(255),
                            allowNull: true,
                          unique: true, 
                        },
                    }, { transaction });
                
            
                
                    await queryInterface.createTable('approvals', {
                        id: {
                            type: Sequelize.DataTypes.UUID,
                            defaultValue: Sequelize.DataTypes.UUIDV4,
                            primaryKey: true,
                        },
                        createdById: {
                            type: Sequelize.DataTypes.UUID,
                            references: {
                                key: 'id',
                                model: 'users',
                            },
                        },
                        updatedById: {
                            type: Sequelize.DataTypes.UUID,
                            references: {
                                key: 'id',
                                model: 'users',
                            },
                        },
                        createdAt: { type: Sequelize.DataTypes.DATE },
                        updatedAt: { type: Sequelize.DataTypes.DATE },
                        deletedAt: { type: Sequelize.DataTypes.DATE },
                        importHash: {
                            type: Sequelize.DataTypes.STRING(255),
                            allowNull: true,
                          unique: true, 
                        },
                    }, { transaction });
                
            
                
                    await queryInterface.createTable('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('audit_logs', {
                        id: {
                            type: Sequelize.DataTypes.UUID,
                            defaultValue: Sequelize.DataTypes.UUIDV4,
                            primaryKey: true,
                        },
                        createdById: {
                            type: Sequelize.DataTypes.UUID,
                            references: {
                                key: 'id',
                                model: 'users',
                            },
                        },
                        updatedById: {
                            type: Sequelize.DataTypes.UUID,
                            references: {
                                key: 'id',
                                model: 'users',
                            },
                        },
                        createdAt: { type: Sequelize.DataTypes.DATE },
                        updatedAt: { type: Sequelize.DataTypes.DATE },
                        deletedAt: { type: Sequelize.DataTypes.DATE },
                        importHash: {
                            type: Sequelize.DataTypes.STRING(255),
                            allowNull: true,
                          unique: true, 
                        },
                    }, { transaction });
                
            
                
                    await queryInterface.createTable('fiscal_years', {
                        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('funding_sources', {
                        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('budget_programs', {
                        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('budget_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('allocations', {
                        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('budget_reallocations', {
                        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('procurement_plans', {
                        id: {
                            type: Sequelize.DataTypes.UUID,
                            defaultValue: Sequelize.DataTypes.UUIDV4,
                            primaryKey: true,
                        },
                        createdById: {
                            type: Sequelize.DataTypes.UUID,
                            references: {
                                key: 'id',
                                model: 'users',
                            },
                        },
                        updatedById: {
                            type: Sequelize.DataTypes.UUID,
                            references: {
                                key: 'id',
                                model: 'users',
                            },
                        },
                        createdAt: { type: Sequelize.DataTypes.DATE },
                        updatedAt: { type: Sequelize.DataTypes.DATE },
                        deletedAt: { type: Sequelize.DataTypes.DATE },
                        importHash: {
                            type: Sequelize.DataTypes.STRING(255),
                            allowNull: true,
                          unique: true, 
                        },
                    }, { transaction });
                
            
                
                    await queryInterface.createTable('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('tenders', {
                        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('vendor_compliance_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('bids', {
                        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('bid_evaluations', {
                        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('awards', {
                        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('programs', {
                        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('projects', {
                        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('project_milestones', {
                        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('risks', {
                        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('issues', {
                        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('field_verifications', {
                        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('contracts', {
                        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('contract_amendments', {
                        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('contract_milestones', {
                        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('grants', {
                        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('beneficiaries', {
                        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('grant_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('grant_evaluations', {
                        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('grant_tranches', {
                        id: {
                            type: Sequelize.DataTypes.UUID,
                            defaultValue: Sequelize.DataTypes.UUIDV4,
                            primaryKey: true,
                        },
                        createdById: {
                            type: Sequelize.DataTypes.UUID,
                            references: {
                                key: 'id',
                                model: 'users',
                            },
                        },
                        updatedById: {
                            type: Sequelize.DataTypes.UUID,
                            references: {
                                key: 'id',
                                model: 'users',
                            },
                        },
                        createdAt: { type: Sequelize.DataTypes.DATE },
                        updatedAt: { type: Sequelize.DataTypes.DATE },
                        deletedAt: { type: Sequelize.DataTypes.DATE },
                        importHash: {
                            type: Sequelize.DataTypes.STRING(255),
                            allowNull: true,
                          unique: true, 
                        },
                    }, { transaction });
                
            
                
                    await queryInterface.createTable('expense_categories', {
                        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('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('payment_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('payment_batches', {
                        id: {
                            type: Sequelize.DataTypes.UUID,
                            defaultValue: Sequelize.DataTypes.UUIDV4,
                            primaryKey: true,
                        },
                        createdById: {
                            type: Sequelize.DataTypes.UUID,
                            references: {
                                key: 'id',
                                model: 'users',
                            },
                        },
                        updatedById: {
                            type: Sequelize.DataTypes.UUID,
                            references: {
                                key: 'id',
                                model: 'users',
                            },
                        },
                        createdAt: { type: Sequelize.DataTypes.DATE },
                        updatedAt: { type: Sequelize.DataTypes.DATE },
                        deletedAt: { type: Sequelize.DataTypes.DATE },
                        importHash: {
                            type: Sequelize.DataTypes.STRING(255),
                            allowNull: true,
                          unique: true, 
                        },
                    }, { transaction });
                
            
                
                    await queryInterface.createTable('payments', {
                        id: {
                            type: Sequelize.DataTypes.UUID,
                            defaultValue: Sequelize.DataTypes.UUIDV4,
                            primaryKey: true,
                        },
                        createdById: {
                            type: Sequelize.DataTypes.UUID,
                            references: {
                                key: 'id',
                                model: 'users',
                            },
                        },
                        updatedById: {
                            type: Sequelize.DataTypes.UUID,
                            references: {
                                key: 'id',
                                model: 'users',
                            },
                        },
                        createdAt: { type: Sequelize.DataTypes.DATE },
                        updatedAt: { type: Sequelize.DataTypes.DATE },
                        deletedAt: { type: Sequelize.DataTypes.DATE },
                        importHash: {
                            type: Sequelize.DataTypes.STRING(255),
                            allowNull: true,
                          unique: true, 
                        },
                    }, { transaction });
                
            
                
                    await queryInterface.createTable('obligations', {
                        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('ledger_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('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('compliance_alerts', {
                        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(
                      'users',
                      'organizationsId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'organizations',
                                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(
                      'roles',
                      'globalAccess',
                      {
                          type: Sequelize.DataTypes.BOOLEAN,
                          
                            defaultValue: false,
                            allowNull: false,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'permissions',
                      'name',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'organizations',
                      'name',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'provinces',
                      'organizationId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'organizations',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'provinces',
                      'name',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'provinces',
                      'code',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'provinces',
                      'status',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['active','inactive'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'departments',
                      'organizationId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'organizations',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'departments',
                      'name',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'departments',
                      'code',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'departments',
                      'parent_departmentId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'departments',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'departments',
                      'status',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['active','inactive'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'role_permissions',
                      'roleId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'roles',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'role_permissions',
                      'permissionId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'permissions',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'role_permissions',
                      'organizationsId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'organizations',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'approval_workflows',
                      'organizationId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'organizations',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'approval_workflows',
                      'name',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'approval_workflows',
                      'module',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['budget','procurement','contract','project','grant','finance','vendor','document'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'approval_workflows',
                      'record_type',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['requisitions','tenders','awards','contracts','contract_amendments','projects','grants','invoices','payment_requests','vendors','budget_reallocations'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'approval_workflows',
                      'status',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['active','inactive'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'approval_steps',
                      'workflowId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'approval_workflows',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'approval_steps',
                      'step_order',
                      {
                          type: Sequelize.DataTypes.INTEGER,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'approval_steps',
                      'name',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'approval_steps',
                      'approver_roleId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'roles',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'approval_steps',
                      'approver_departmentId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'departments',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'approval_steps',
                      'min_amount',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'approval_steps',
                      'max_amount',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'approval_steps',
                      'requires_comment',
                      {
                          type: Sequelize.DataTypes.BOOLEAN,
                          
                            defaultValue: false,
                            allowNull: false,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'approval_steps',
                      'organizationsId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'organizations',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'approvals',
                      'organizationId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'organizations',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'approvals',
                      'workflowId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'approval_workflows',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'approvals',
                      'stepId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'approval_steps',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'approvals',
                      'record_type',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'approvals',
                      'record_key',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'approvals',
                      'status',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['pending','approved','rejected','cancelled'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'approvals',
                      'requested_by_userId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'users',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'approvals',
                      'assigned_to_userId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'users',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'approvals',
                      'requested_at',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'approvals',
                      'decided_at',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'approvals',
                      'decision_comment',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'approvals',
                      'rejection_reason',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'notifications',
                      'organizationId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'organizations',
                                key: 'id',
                            },
                          
                      },
                      { 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: ['approval_assigned','approval_decided','budget_alert','procurement_alert','contract_expiry','vendor_compliance','payment_overdue','document_required','system'],
                          
                          
                      },
                      { 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',
                      'record_type',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'notifications',
                      'record_key',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'notifications',
                      'read',
                      {
                          type: Sequelize.DataTypes.BOOLEAN,
                          
                            defaultValue: false,
                            allowNull: false,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'notifications',
                      'sent_at',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'audit_logs',
                      'organizationId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'organizations',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'audit_logs',
                      'actor_userId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'users',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'audit_logs',
                      'action',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'audit_logs',
                      'entity_name',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'audit_logs',
                      'record_key',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'audit_logs',
                      'summary',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'audit_logs',
                      'occurred_at',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'audit_logs',
                      'ip_address',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'audit_logs',
                      'user_agent',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'fiscal_years',
                      'organizationId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'organizations',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'fiscal_years',
                      'name',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'fiscal_years',
                      'start_date',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'fiscal_years',
                      'end_date',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'fiscal_years',
                      'status',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['draft','open','closed'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'fiscal_years',
                      'is_current',
                      {
                          type: Sequelize.DataTypes.BOOLEAN,
                          
                            defaultValue: false,
                            allowNull: false,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'funding_sources',
                      'organizationId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'organizations',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'funding_sources',
                      'name',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'funding_sources',
                      'source_type',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['government','donor','telecom_levy','state_program','other'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'funding_sources',
                      'reference_code',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'funding_sources',
                      'currency',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['CDF','USD'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'funding_sources',
                      'total_committed_amount',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'funding_sources',
                      'effective_date',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'funding_sources',
                      'status',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['active','inactive'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'budget_programs',
                      'organizationId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'organizations',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'budget_programs',
                      'fiscal_yearId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'fiscal_years',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'budget_programs',
                      'funding_sourceId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'funding_sources',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'budget_programs',
                      'name',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'budget_programs',
                      'code',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'budget_programs',
                      'objective',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'budget_programs',
                      'status',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['draft','submitted','approved','active','closed'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'budget_programs',
                      'approved_amount',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'budget_programs',
                      'currency',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['CDF','USD'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'budget_lines',
                      'budget_programId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'budget_programs',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'budget_lines',
                      'name',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'budget_lines',
                      'code',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'budget_lines',
                      'description',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'budget_lines',
                      'category',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['capex','opex','grant','consulting','infrastructure','equipment','services','other'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'budget_lines',
                      'approved_amount',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'budget_lines',
                      'committed_amount',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'budget_lines',
                      'disbursed_amount',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'budget_lines',
                      'currency',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['CDF','USD'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'budget_lines',
                      'status',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['active','inactive'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'budget_lines',
                      'organizationsId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'organizations',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'allocations',
                      'budget_lineId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'budget_lines',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'allocations',
                      'provinceId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'provinces',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'allocations',
                      'departmentId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'departments',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'allocations',
                      'amount',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'allocations',
                      'currency',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['CDF','USD'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'allocations',
                      'allocated_at',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'allocations',
                      'status',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['draft','approved','active','reduced','closed'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'allocations',
                      'notes',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'allocations',
                      'organizationsId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'organizations',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'budget_reallocations',
                      'organizationId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'organizations',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'budget_reallocations',
                      'fiscal_yearId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'fiscal_years',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'budget_reallocations',
                      'from_budget_lineId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'budget_lines',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'budget_reallocations',
                      'to_budget_lineId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'budget_lines',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'budget_reallocations',
                      'amount',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'budget_reallocations',
                      'currency',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['CDF','USD'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'budget_reallocations',
                      'status',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['draft','submitted','approved','rejected','cancelled'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'budget_reallocations',
                      'requested_by_userId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'users',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'budget_reallocations',
                      'requested_at',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'budget_reallocations',
                      'justification',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'procurement_plans',
                      'organizationId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'organizations',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'procurement_plans',
                      'fiscal_yearId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'fiscal_years',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'procurement_plans',
                      'departmentId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'departments',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'procurement_plans',
                      'name',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'procurement_plans',
                      'status',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['draft','submitted','approved','active','closed'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'procurement_plans',
                      'estimated_total_amount',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'procurement_plans',
                      'currency',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['CDF','USD'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'procurement_plans',
                      'submitted_at',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'procurement_plans',
                      'approved_at',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'requisitions',
                      'organizationId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'organizations',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'requisitions',
                      'procurement_planId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'procurement_plans',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'requisitions',
                      'requesting_departmentId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'departments',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'requisitions',
                      'budget_lineId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'budget_lines',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'requisitions',
                      'provinceId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'provinces',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'requisitions',
                      'requisition_number',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'requisitions',
                      'title',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'requisitions',
                      'scope_of_work',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'requisitions',
                      'procurement_method',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['open_tender','restricted_tender','rfq','direct_award','consultation'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'requisitions',
                      'estimated_amount',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'requisitions',
                      'currency',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['CDF','USD'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'requisitions',
                      'needed_by_date',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'requisitions',
                      'status',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['draft','submitted','under_review','approved','rejected','cancelled','in_tender','awarded','converted_to_contract'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'requisitions',
                      'requested_by_userId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'users',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'requisitions',
                      'submitted_at',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'requisitions',
                      'rejection_reason',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'tenders',
                      'organizationId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'organizations',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'tenders',
                      'requisitionId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'requisitions',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'tenders',
                      'tender_number',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'tenders',
                      'title',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'tenders',
                      'tender_type',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['open_tender','restricted_tender','consultation','rfq'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'tenders',
                      'published_at',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'tenders',
                      'closing_at',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'tenders',
                      'opening_at',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'tenders',
                      'status',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['draft','published','closed','under_evaluation','recommended','awarded','cancelled'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'tenders',
                      'eligibility_criteria',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'tenders',
                      'submission_instructions',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'vendors',
                      'organizationId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'organizations',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'vendors',
                      'name',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'vendors',
                      'trade_name',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'vendors',
                      'vendor_type',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['company','ngo','public_entity','individual'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'vendors',
                      'registration_number',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'vendors',
                      'tax_number',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'vendors',
                      'contact_name',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'vendors',
                      'contact_email',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'vendors',
                      'contact_phone',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'vendors',
                      'address',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'vendors',
                      'bank_name',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'vendors',
                      'bank_account_number',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'vendors',
                      'bank_account_name',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'vendors',
                      'bank_swift',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'vendors',
                      'qualification_status',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['unsubmitted','under_review','qualified','conditionally_qualified','suspended','disqualified'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'vendors',
                      'qualification_reviewed_at',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'vendors',
                      'risk_rating',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['low','medium','high','critical'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'vendors',
                      'is_blacklisted',
                      {
                          type: Sequelize.DataTypes.BOOLEAN,
                          
                            defaultValue: false,
                            allowNull: false,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'vendors',
                      'compliance_valid_until',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'vendor_compliance_documents',
                      'vendorId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'vendors',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'vendor_compliance_documents',
                      'document_type',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['rccm','tax_clearance','cnss','business_license','bank_letter','id','other'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'vendor_compliance_documents',
                      'reference_number',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'vendor_compliance_documents',
                      'issued_at',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'vendor_compliance_documents',
                      'expires_at',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'vendor_compliance_documents',
                      'status',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['valid','expiring','expired','rejected','pending_review'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'vendor_compliance_documents',
                      'review_comment',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
            
                
                    
                    await queryInterface.addColumn(
                      'vendor_compliance_documents',
                      'organizationsId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'organizations',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'bids',
                      'tenderId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'tenders',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'bids',
                      'vendorId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'vendors',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'bids',
                      'bid_reference',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'bids',
                      'submitted_at',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'bids',
                      'bid_amount',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'bids',
                      'currency',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['CDF','USD'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'bids',
                      'status',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['submitted','withdrawn','responsive','non_responsive','shortlisted','recommended','not_recommended'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'bids',
                      'notes',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'bids',
                      'organizationsId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'organizations',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'bid_evaluations',
                      'bidId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'bids',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'bid_evaluations',
                      'lead_evaluator_userId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'users',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'bid_evaluations',
                      'technical_score',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'bid_evaluations',
                      'financial_score',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'bid_evaluations',
                      'total_score',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'bid_evaluations',
                      'recommendation',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['award','reserve','reject'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'bid_evaluations',
                      'justification',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'bid_evaluations',
                      'evaluated_at',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'bid_evaluations',
                      'organizationsId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'organizations',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'awards',
                      'organizationId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'organizations',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'awards',
                      'tenderId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'tenders',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'awards',
                      'winning_bidId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'bids',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'awards',
                      'award_number',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'awards',
                      'award_amount',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'awards',
                      'currency',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['CDF','USD'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'awards',
                      'decision_date',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'awards',
                      'status',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['draft','submitted','approved','rejected','contract_initiated','cancelled'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'awards',
                      'award_memo',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'programs',
                      'organizationId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'organizations',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'programs',
                      'fiscal_yearId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'fiscal_years',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'programs',
                      'funding_sourceId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'funding_sources',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'programs',
                      'name',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'programs',
                      'code',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'programs',
                      'description',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'programs',
                      'status',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['draft','approved','active','closed'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'programs',
                      'budget_amount',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'programs',
                      'currency',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['CDF','USD'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'projects',
                      'organizationId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'organizations',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'projects',
                      'programId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'programs',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'projects',
                      'provinceId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'provinces',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'projects',
                      'budget_lineId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'budget_lines',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'projects',
                      'name',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'projects',
                      'project_code',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'projects',
                      'implementing_entity',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'projects',
                      'objectives',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'projects',
                      'start_date',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'projects',
                      'end_date',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'projects',
                      'planned_budget',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'projects',
                      'currency',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['CDF','USD'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'projects',
                      'completion_percent',
                      {
                          type: Sequelize.DataTypes.INTEGER,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'projects',
                      'status',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['draft','submitted','approved','active','on_hold','completed','closed'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'projects',
                      'risk_level',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['low','medium','high','critical'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'projects',
                      'reporting_cycle',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'projects',
                      'last_reported_at',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'project_milestones',
                      'projectId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'projects',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'project_milestones',
                      'name',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'project_milestones',
                      'description',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'project_milestones',
                      'planned_start_date',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'project_milestones',
                      'planned_end_date',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'project_milestones',
                      'actual_end_date',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'project_milestones',
                      'status',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['planned','in_progress','completed','blocked','cancelled'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'project_milestones',
                      'weight_percent',
                      {
                          type: Sequelize.DataTypes.INTEGER,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'project_milestones',
                      'organizationsId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'organizations',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'risks',
                      'projectId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'projects',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'risks',
                      'title',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'risks',
                      'description',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'risks',
                      'category',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['financial','procurement','technical','security','compliance','schedule','stakeholder','other'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'risks',
                      'likelihood',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['low','medium','high'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'risks',
                      'impact',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['low','medium','high','critical'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'risks',
                      'status',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['open','mitigating','closed','accepted'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'risks',
                      'mitigation_plan',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'risks',
                      'owner_userId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'users',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'risks',
                      'identified_at',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'risks',
                      'review_due_at',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'risks',
                      'organizationsId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'organizations',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'issues',
                      'projectId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'projects',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'issues',
                      'title',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'issues',
                      'description',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'issues',
                      'severity',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['low','medium','high','critical'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'issues',
                      'status',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['open','in_progress','blocked','resolved','closed'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'issues',
                      'assigned_to_userId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'users',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'issues',
                      'opened_at',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'issues',
                      'due_at',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'issues',
                      'resolved_at',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'issues',
                      'organizationsId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'organizations',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'field_verifications',
                      'projectId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'projects',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'field_verifications',
                      'verified_by_userId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'users',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'field_verifications',
                      'visit_date',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'field_verifications',
                      'verification_type',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['site_visit','remote_validation','document_review','stakeholder_interview'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'field_verifications',
                      'outcome',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['pass','partial','fail','follow_up_required'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'field_verifications',
                      'findings',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'field_verifications',
                      'actions_required',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'field_verifications',
                      'next_followup_at',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
            
                
                    
                    await queryInterface.addColumn(
                      'field_verifications',
                      'organizationsId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'organizations',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'contracts',
                      'organizationId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'organizations',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'contracts',
                      'vendorId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'vendors',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'contracts',
                      'awardId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'awards',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'contracts',
                      'projectId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'projects',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'contracts',
                      'budget_lineId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'budget_lines',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'contracts',
                      'contract_number',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'contracts',
                      'title',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'contracts',
                      'contract_type',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['works','goods','services','consulting','grant_agreement'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'contracts',
                      'contract_value',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'contracts',
                      'currency',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['CDF','USD'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'contracts',
                      'start_date',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'contracts',
                      'end_date',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'contracts',
                      'status',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['draft','under_review','active','suspended','completed','terminated','expired','closed'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'contracts',
                      'retention_percent',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'contracts',
                      'penalty_rate_percent',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'contracts',
                      'signed_at',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'contract_amendments',
                      'contractId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'contracts',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'contract_amendments',
                      'amendment_number',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'contract_amendments',
                      'amendment_type',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['value_change','time_extension','scope_change','administrative','other'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'contract_amendments',
                      'value_change_amount',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'contract_amendments',
                      'days_extension',
                      {
                          type: Sequelize.DataTypes.INTEGER,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'contract_amendments',
                      'description',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'contract_amendments',
                      'status',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['draft','submitted','approved','rejected','implemented'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'contract_amendments',
                      'effective_date',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'contract_amendments',
                      'organizationsId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'organizations',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'contract_milestones',
                      'contractId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'contracts',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'contract_milestones',
                      'name',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'contract_milestones',
                      'deliverable_description',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'contract_milestones',
                      'due_date',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'contract_milestones',
                      'accepted_at',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'contract_milestones',
                      'status',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['planned','due','submitted','accepted','rejected','overdue'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'contract_milestones',
                      'payment_percent',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'contract_milestones',
                      'organizationsId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'organizations',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'grants',
                      'organizationId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'organizations',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'grants',
                      'programId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'programs',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'grants',
                      'funding_window_name',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'grants',
                      'call_reference',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'grants',
                      'call_open_at',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'grants',
                      'call_close_at',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'grants',
                      'status',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['draft','open','closed','evaluation','awarded','disbursing','completed','cancelled'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'grants',
                      'eligibility_rules',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'grants',
                      'total_envelope_amount',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'grants',
                      'currency',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['CDF','USD'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'grants',
                      'notes',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'beneficiaries',
                      'grantId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'grants',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'beneficiaries',
                      'provinceId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'provinces',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'beneficiaries',
                      'name',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'beneficiaries',
                      'beneficiary_type',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['ngo','school','community_center','local_government','public_institution','operator','other'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'beneficiaries',
                      'registration_number',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'beneficiaries',
                      'contact_email',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'beneficiaries',
                      'contact_phone',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'beneficiaries',
                      'approved_amount',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'beneficiaries',
                      'currency',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['CDF','USD'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'beneficiaries',
                      'status',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['applicant','under_review','approved','rejected','active','suspended','closed'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'beneficiaries',
                      'approved_at',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'beneficiaries',
                      'organizationsId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'organizations',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'grant_applications',
                      'grantId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'grants',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'grant_applications',
                      'beneficiaryId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'beneficiaries',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'grant_applications',
                      'application_reference',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'grant_applications',
                      'submitted_at',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'grant_applications',
                      'requested_amount',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'grant_applications',
                      'currency',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['CDF','USD'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'grant_applications',
                      'proposal_summary',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'grant_applications',
                      'status',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['draft','submitted','eligible','ineligible','scoring','recommended','approved','rejected'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'grant_applications',
                      'organizationsId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'organizations',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'grant_evaluations',
                      'applicationId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'grant_applications',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'grant_evaluations',
                      'evaluator_userId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'users',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'grant_evaluations',
                      'score',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'grant_evaluations',
                      'comments',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'grant_evaluations',
                      'recommendation',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['approve','revise','reject'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'grant_evaluations',
                      'evaluated_at',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'grant_evaluations',
                      'organizationsId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'organizations',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'grant_tranches',
                      'applicationId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'grant_applications',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'grant_tranches',
                      'tranche_number',
                      {
                          type: Sequelize.DataTypes.INTEGER,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'grant_tranches',
                      'amount',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'grant_tranches',
                      'currency',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['CDF','USD'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'grant_tranches',
                      'planned_disbursement_at',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'grant_tranches',
                      'disbursed_at',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'grant_tranches',
                      'status',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['planned','pending_approval','approved','disbursed','on_hold','cancelled'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'grant_tranches',
                      'conditions',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'grant_tranches',
                      'organizationsId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'organizations',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'expense_categories',
                      'organizationId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'organizations',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'expense_categories',
                      'name',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'expense_categories',
                      'code',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'expense_categories',
                      'description',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'expense_categories',
                      'status',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['active','inactive'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'invoices',
                      'organizationId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'organizations',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'invoices',
                      'vendorId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'vendors',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'invoices',
                      'contractId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'contracts',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'invoices',
                      'projectId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'projects',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'invoices',
                      'expense_categoryId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'expense_categories',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'invoices',
                      'invoice_number',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'invoices',
                      'invoice_date',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'invoices',
                      'received_at',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'invoices',
                      'due_date',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'invoices',
                      'subtotal_amount',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'invoices',
                      'tax_amount',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'invoices',
                      'total_amount',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'invoices',
                      'currency',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['CDF','USD'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'invoices',
                      'status',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['draft','received','validated','disputed','approved_for_payment','paid','cancelled'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'invoices',
                      'notes',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'payment_requests',
                      'organizationId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'organizations',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'payment_requests',
                      'invoiceId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'invoices',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'payment_requests',
                      'request_number',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'payment_requests',
                      'requested_amount',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'payment_requests',
                      'currency',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['CDF','USD'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'payment_requests',
                      'payment_method',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['bank_transfer','mobile_money','check','cash'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'payment_requests',
                      'status',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['draft','submitted','under_review','approved','rejected','batched','paid','cancelled'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'payment_requests',
                      'requested_by_userId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'users',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'payment_requests',
                      'requested_at',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'payment_requests',
                      'justification',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'payment_batches',
                      'organizationId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'organizations',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'payment_batches',
                      'batch_number',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'payment_batches',
                      'status',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['draft','submitted','approved','processing','completed','cancelled'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'payment_batches',
                      'currency',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['CDF','USD'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'payment_batches',
                      'total_amount',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'payment_batches',
                      'scheduled_at',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'payment_batches',
                      'processed_at',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'payment_batches',
                      'prepared_by_userId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'users',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'payments',
                      'organizationId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'organizations',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'payments',
                      'payment_requestId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'payment_requests',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'payments',
                      'batchId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'payment_batches',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'payments',
                      'vendorId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'vendors',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'payments',
                      'payment_reference',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'payments',
                      'payment_date',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'payments',
                      'amount',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'payments',
                      'currency',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['CDF','USD'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'payments',
                      'status',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['pending','processed','failed','reversed'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'payments',
                      'failure_reason',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'obligations',
                      'organizationId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'organizations',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'obligations',
                      'budget_lineId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'budget_lines',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'obligations',
                      'contractId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'contracts',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'obligations',
                      'projectId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'projects',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'obligations',
                      'obligation_number',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'obligations',
                      'amount',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'obligations',
                      'currency',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['CDF','USD'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'obligations',
                      'obligated_at',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'obligations',
                      'status',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['open','partially_settled','settled','cancelled'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'obligations',
                      'notes',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'ledger_entries',
                      'organizationId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'organizations',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'ledger_entries',
                      'fiscal_yearId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'fiscal_years',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'ledger_entries',
                      'entry_reference',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'ledger_entries',
                      'entry_date',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'ledger_entries',
                      'entry_type',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['commitment','obligation','invoice','payment','adjustment','reversal'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'ledger_entries',
                      'currency',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['CDF','USD'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'ledger_entries',
                      'debit_amount',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'ledger_entries',
                      'credit_amount',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'ledger_entries',
                      'description',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'ledger_entries',
                      'record_type',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'ledger_entries',
                      'record_key',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'documents',
                      'organizationId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'organizations',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'documents',
                      'category',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['requisition','tender_dossier','bid_evaluation_report','award_memo','contract','invoice','delivery_note','acceptance_certificate','compliance_file','other'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'documents',
                      'title',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'documents',
                      'description',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'documents',
                      'record_type',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'documents',
                      'record_key',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
            
                
                    
                    await queryInterface.addColumn(
                      'documents',
                      'version_number',
                      {
                          type: Sequelize.DataTypes.INTEGER,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'documents',
                      'access_level',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['public_within_org','restricted','confidential'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'documents',
                      'uploaded_by_userId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'users',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'documents',
                      'uploaded_at',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'compliance_alerts',
                      'organizationId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'organizations',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'compliance_alerts',
                      'alert_type',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['missing_document','budget_overrun','segregation_of_duties','vendor_document_expiry','contract_expiry','payment_overdue','other'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'compliance_alerts',
                      'severity',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['info','warning','high','critical'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'compliance_alerts',
                      'title',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'compliance_alerts',
                      'details',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'compliance_alerts',
                      'record_type',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'compliance_alerts',
                      'record_key',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'compliance_alerts',
                      'status',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['open','acknowledged','resolved','dismissed'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'compliance_alerts',
                      'assigned_to_userId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'users',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'compliance_alerts',
                      'detected_at',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'compliance_alerts',
                      'due_at',
                      {
                          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(
                        'compliance_alerts',
                        'due_at',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'compliance_alerts',
                        'detected_at',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'compliance_alerts',
                        'assigned_to_userId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'compliance_alerts',
                        'status',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'compliance_alerts',
                        'record_key',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'compliance_alerts',
                        'record_type',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'compliance_alerts',
                        'details',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'compliance_alerts',
                        'title',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'compliance_alerts',
                        'severity',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'compliance_alerts',
                        'alert_type',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'compliance_alerts',
                        'organizationId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'documents',
                        'uploaded_at',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'documents',
                        'uploaded_by_userId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'documents',
                        'access_level',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'documents',
                        'version_number',
                        { transaction }
                    );
                
            
                
            
                
                    await queryInterface.removeColumn(
                        'documents',
                        'record_key',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'documents',
                        'record_type',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'documents',
                        'description',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'documents',
                        'title',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'documents',
                        'category',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'documents',
                        'organizationId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'ledger_entries',
                        'record_key',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'ledger_entries',
                        'record_type',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'ledger_entries',
                        'description',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'ledger_entries',
                        'credit_amount',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'ledger_entries',
                        'debit_amount',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'ledger_entries',
                        'currency',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'ledger_entries',
                        'entry_type',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'ledger_entries',
                        'entry_date',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'ledger_entries',
                        'entry_reference',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'ledger_entries',
                        'fiscal_yearId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'ledger_entries',
                        'organizationId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'obligations',
                        'notes',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'obligations',
                        'status',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'obligations',
                        'obligated_at',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'obligations',
                        'currency',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'obligations',
                        'amount',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'obligations',
                        'obligation_number',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'obligations',
                        'projectId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'obligations',
                        'contractId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'obligations',
                        'budget_lineId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'obligations',
                        'organizationId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'payments',
                        'failure_reason',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'payments',
                        'status',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'payments',
                        'currency',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'payments',
                        'amount',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'payments',
                        'payment_date',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'payments',
                        'payment_reference',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'payments',
                        'vendorId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'payments',
                        'batchId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'payments',
                        'payment_requestId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'payments',
                        'organizationId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'payment_batches',
                        'prepared_by_userId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'payment_batches',
                        'processed_at',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'payment_batches',
                        'scheduled_at',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'payment_batches',
                        'total_amount',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'payment_batches',
                        'currency',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'payment_batches',
                        'status',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'payment_batches',
                        'batch_number',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'payment_batches',
                        'organizationId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'payment_requests',
                        'justification',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'payment_requests',
                        'requested_at',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'payment_requests',
                        'requested_by_userId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'payment_requests',
                        'status',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'payment_requests',
                        'payment_method',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'payment_requests',
                        'currency',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'payment_requests',
                        'requested_amount',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'payment_requests',
                        'request_number',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'payment_requests',
                        'invoiceId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'payment_requests',
                        'organizationId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'invoices',
                        'notes',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'invoices',
                        'status',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'invoices',
                        'currency',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'invoices',
                        'total_amount',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'invoices',
                        'tax_amount',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'invoices',
                        'subtotal_amount',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'invoices',
                        'due_date',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'invoices',
                        'received_at',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'invoices',
                        'invoice_date',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'invoices',
                        'invoice_number',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'invoices',
                        'expense_categoryId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'invoices',
                        'projectId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'invoices',
                        'contractId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'invoices',
                        'vendorId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'invoices',
                        'organizationId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'expense_categories',
                        'status',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'expense_categories',
                        'description',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'expense_categories',
                        'code',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'expense_categories',
                        'name',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'expense_categories',
                        'organizationId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'grant_tranches',
                        'organizationsId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'grant_tranches',
                        'conditions',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'grant_tranches',
                        'status',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'grant_tranches',
                        'disbursed_at',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'grant_tranches',
                        'planned_disbursement_at',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'grant_tranches',
                        'currency',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'grant_tranches',
                        'amount',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'grant_tranches',
                        'tranche_number',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'grant_tranches',
                        'applicationId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'grant_evaluations',
                        'organizationsId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'grant_evaluations',
                        'evaluated_at',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'grant_evaluations',
                        'recommendation',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'grant_evaluations',
                        'comments',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'grant_evaluations',
                        'score',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'grant_evaluations',
                        'evaluator_userId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'grant_evaluations',
                        'applicationId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'grant_applications',
                        'organizationsId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'grant_applications',
                        'status',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'grant_applications',
                        'proposal_summary',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'grant_applications',
                        'currency',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'grant_applications',
                        'requested_amount',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'grant_applications',
                        'submitted_at',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'grant_applications',
                        'application_reference',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'grant_applications',
                        'beneficiaryId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'grant_applications',
                        'grantId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'beneficiaries',
                        'organizationsId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'beneficiaries',
                        'approved_at',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'beneficiaries',
                        'status',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'beneficiaries',
                        'currency',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'beneficiaries',
                        'approved_amount',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'beneficiaries',
                        'contact_phone',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'beneficiaries',
                        'contact_email',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'beneficiaries',
                        'registration_number',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'beneficiaries',
                        'beneficiary_type',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'beneficiaries',
                        'name',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'beneficiaries',
                        'provinceId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'beneficiaries',
                        'grantId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'grants',
                        'notes',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'grants',
                        'currency',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'grants',
                        'total_envelope_amount',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'grants',
                        'eligibility_rules',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'grants',
                        'status',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'grants',
                        'call_close_at',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'grants',
                        'call_open_at',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'grants',
                        'call_reference',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'grants',
                        'funding_window_name',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'grants',
                        'programId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'grants',
                        'organizationId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'contract_milestones',
                        'organizationsId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'contract_milestones',
                        'payment_percent',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'contract_milestones',
                        'status',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'contract_milestones',
                        'accepted_at',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'contract_milestones',
                        'due_date',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'contract_milestones',
                        'deliverable_description',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'contract_milestones',
                        'name',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'contract_milestones',
                        'contractId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'contract_amendments',
                        'organizationsId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'contract_amendments',
                        'effective_date',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'contract_amendments',
                        'status',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'contract_amendments',
                        'description',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'contract_amendments',
                        'days_extension',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'contract_amendments',
                        'value_change_amount',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'contract_amendments',
                        'amendment_type',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'contract_amendments',
                        'amendment_number',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'contract_amendments',
                        'contractId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'contracts',
                        'signed_at',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'contracts',
                        'penalty_rate_percent',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'contracts',
                        'retention_percent',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'contracts',
                        'status',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'contracts',
                        'end_date',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'contracts',
                        'start_date',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'contracts',
                        'currency',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'contracts',
                        'contract_value',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'contracts',
                        'contract_type',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'contracts',
                        'title',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'contracts',
                        'contract_number',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'contracts',
                        'budget_lineId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'contracts',
                        'projectId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'contracts',
                        'awardId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'contracts',
                        'vendorId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'contracts',
                        'organizationId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'field_verifications',
                        'organizationsId',
                        { transaction }
                    );
                
            
                
            
                
                    await queryInterface.removeColumn(
                        'field_verifications',
                        'next_followup_at',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'field_verifications',
                        'actions_required',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'field_verifications',
                        'findings',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'field_verifications',
                        'outcome',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'field_verifications',
                        'verification_type',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'field_verifications',
                        'visit_date',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'field_verifications',
                        'verified_by_userId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'field_verifications',
                        'projectId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'issues',
                        'organizationsId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'issues',
                        'resolved_at',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'issues',
                        'due_at',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'issues',
                        'opened_at',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'issues',
                        'assigned_to_userId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'issues',
                        'status',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'issues',
                        'severity',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'issues',
                        'description',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'issues',
                        'title',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'issues',
                        'projectId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'risks',
                        'organizationsId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'risks',
                        'review_due_at',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'risks',
                        'identified_at',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'risks',
                        'owner_userId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'risks',
                        'mitigation_plan',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'risks',
                        'status',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'risks',
                        'impact',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'risks',
                        'likelihood',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'risks',
                        'category',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'risks',
                        'description',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'risks',
                        'title',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'risks',
                        'projectId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'project_milestones',
                        'organizationsId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'project_milestones',
                        'weight_percent',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'project_milestones',
                        'status',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'project_milestones',
                        'actual_end_date',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'project_milestones',
                        'planned_end_date',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'project_milestones',
                        'planned_start_date',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'project_milestones',
                        'description',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'project_milestones',
                        'name',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'project_milestones',
                        'projectId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'projects',
                        'last_reported_at',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'projects',
                        'reporting_cycle',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'projects',
                        'risk_level',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'projects',
                        'status',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'projects',
                        'completion_percent',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'projects',
                        'currency',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'projects',
                        'planned_budget',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'projects',
                        'end_date',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'projects',
                        'start_date',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'projects',
                        'objectives',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'projects',
                        'implementing_entity',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'projects',
                        'project_code',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'projects',
                        'name',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'projects',
                        'budget_lineId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'projects',
                        'provinceId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'projects',
                        'programId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'projects',
                        'organizationId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'programs',
                        'currency',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'programs',
                        'budget_amount',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'programs',
                        'status',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'programs',
                        'description',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'programs',
                        'code',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'programs',
                        'name',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'programs',
                        'funding_sourceId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'programs',
                        'fiscal_yearId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'programs',
                        'organizationId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'awards',
                        'award_memo',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'awards',
                        'status',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'awards',
                        'decision_date',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'awards',
                        'currency',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'awards',
                        'award_amount',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'awards',
                        'award_number',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'awards',
                        'winning_bidId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'awards',
                        'tenderId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'awards',
                        'organizationId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'bid_evaluations',
                        'organizationsId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'bid_evaluations',
                        'evaluated_at',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'bid_evaluations',
                        'justification',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'bid_evaluations',
                        'recommendation',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'bid_evaluations',
                        'total_score',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'bid_evaluations',
                        'financial_score',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'bid_evaluations',
                        'technical_score',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'bid_evaluations',
                        'lead_evaluator_userId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'bid_evaluations',
                        'bidId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'bids',
                        'organizationsId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'bids',
                        'notes',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'bids',
                        'status',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'bids',
                        'currency',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'bids',
                        'bid_amount',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'bids',
                        'submitted_at',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'bids',
                        'bid_reference',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'bids',
                        'vendorId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'bids',
                        'tenderId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'vendor_compliance_documents',
                        'organizationsId',
                        { transaction }
                    );
                
            
                
            
                
                    await queryInterface.removeColumn(
                        'vendor_compliance_documents',
                        'review_comment',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'vendor_compliance_documents',
                        'status',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'vendor_compliance_documents',
                        'expires_at',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'vendor_compliance_documents',
                        'issued_at',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'vendor_compliance_documents',
                        'reference_number',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'vendor_compliance_documents',
                        'document_type',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'vendor_compliance_documents',
                        'vendorId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'vendors',
                        'compliance_valid_until',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'vendors',
                        'is_blacklisted',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'vendors',
                        'risk_rating',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'vendors',
                        'qualification_reviewed_at',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'vendors',
                        'qualification_status',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'vendors',
                        'bank_swift',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'vendors',
                        'bank_account_name',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'vendors',
                        'bank_account_number',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'vendors',
                        'bank_name',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'vendors',
                        'address',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'vendors',
                        'contact_phone',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'vendors',
                        'contact_email',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'vendors',
                        'contact_name',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'vendors',
                        'tax_number',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'vendors',
                        'registration_number',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'vendors',
                        'vendor_type',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'vendors',
                        'trade_name',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'vendors',
                        'name',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'vendors',
                        'organizationId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'tenders',
                        'submission_instructions',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'tenders',
                        'eligibility_criteria',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'tenders',
                        'status',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'tenders',
                        'opening_at',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'tenders',
                        'closing_at',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'tenders',
                        'published_at',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'tenders',
                        'tender_type',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'tenders',
                        'title',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'tenders',
                        'tender_number',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'tenders',
                        'requisitionId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'tenders',
                        'organizationId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'requisitions',
                        'rejection_reason',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'requisitions',
                        'submitted_at',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'requisitions',
                        'requested_by_userId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'requisitions',
                        'status',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'requisitions',
                        'needed_by_date',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'requisitions',
                        'currency',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'requisitions',
                        'estimated_amount',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'requisitions',
                        'procurement_method',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'requisitions',
                        'scope_of_work',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'requisitions',
                        'title',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'requisitions',
                        'requisition_number',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'requisitions',
                        'provinceId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'requisitions',
                        'budget_lineId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'requisitions',
                        'requesting_departmentId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'requisitions',
                        'procurement_planId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'requisitions',
                        'organizationId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'procurement_plans',
                        'approved_at',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'procurement_plans',
                        'submitted_at',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'procurement_plans',
                        'currency',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'procurement_plans',
                        'estimated_total_amount',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'procurement_plans',
                        'status',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'procurement_plans',
                        'name',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'procurement_plans',
                        'departmentId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'procurement_plans',
                        'fiscal_yearId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'procurement_plans',
                        'organizationId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'budget_reallocations',
                        'justification',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'budget_reallocations',
                        'requested_at',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'budget_reallocations',
                        'requested_by_userId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'budget_reallocations',
                        'status',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'budget_reallocations',
                        'currency',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'budget_reallocations',
                        'amount',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'budget_reallocations',
                        'to_budget_lineId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'budget_reallocations',
                        'from_budget_lineId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'budget_reallocations',
                        'fiscal_yearId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'budget_reallocations',
                        'organizationId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'allocations',
                        'organizationsId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'allocations',
                        'notes',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'allocations',
                        'status',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'allocations',
                        'allocated_at',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'allocations',
                        'currency',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'allocations',
                        'amount',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'allocations',
                        'departmentId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'allocations',
                        'provinceId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'allocations',
                        'budget_lineId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'budget_lines',
                        'organizationsId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'budget_lines',
                        'status',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'budget_lines',
                        'currency',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'budget_lines',
                        'disbursed_amount',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'budget_lines',
                        'committed_amount',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'budget_lines',
                        'approved_amount',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'budget_lines',
                        'category',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'budget_lines',
                        'description',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'budget_lines',
                        'code',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'budget_lines',
                        'name',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'budget_lines',
                        'budget_programId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'budget_programs',
                        'currency',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'budget_programs',
                        'approved_amount',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'budget_programs',
                        'status',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'budget_programs',
                        'objective',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'budget_programs',
                        'code',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'budget_programs',
                        'name',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'budget_programs',
                        'funding_sourceId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'budget_programs',
                        'fiscal_yearId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'budget_programs',
                        'organizationId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'funding_sources',
                        'status',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'funding_sources',
                        'effective_date',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'funding_sources',
                        'total_committed_amount',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'funding_sources',
                        'currency',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'funding_sources',
                        'reference_code',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'funding_sources',
                        'source_type',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'funding_sources',
                        'name',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'funding_sources',
                        'organizationId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'fiscal_years',
                        'is_current',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'fiscal_years',
                        'status',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'fiscal_years',
                        'end_date',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'fiscal_years',
                        'start_date',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'fiscal_years',
                        'name',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'fiscal_years',
                        'organizationId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'audit_logs',
                        'user_agent',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'audit_logs',
                        'ip_address',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'audit_logs',
                        'occurred_at',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'audit_logs',
                        'summary',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'audit_logs',
                        'record_key',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'audit_logs',
                        'entity_name',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'audit_logs',
                        'action',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'audit_logs',
                        'actor_userId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'audit_logs',
                        'organizationId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'notifications',
                        'sent_at',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'notifications',
                        'read',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'notifications',
                        'record_key',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'notifications',
                        'record_type',
                        { 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(
                        'notifications',
                        'organizationId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'approvals',
                        'rejection_reason',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'approvals',
                        'decision_comment',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'approvals',
                        'decided_at',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'approvals',
                        'requested_at',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'approvals',
                        'assigned_to_userId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'approvals',
                        'requested_by_userId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'approvals',
                        'status',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'approvals',
                        'record_key',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'approvals',
                        'record_type',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'approvals',
                        'stepId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'approvals',
                        'workflowId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'approvals',
                        'organizationId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'approval_steps',
                        'organizationsId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'approval_steps',
                        'requires_comment',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'approval_steps',
                        'max_amount',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'approval_steps',
                        'min_amount',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'approval_steps',
                        'approver_departmentId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'approval_steps',
                        'approver_roleId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'approval_steps',
                        'name',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'approval_steps',
                        'step_order',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'approval_steps',
                        'workflowId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'approval_workflows',
                        'status',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'approval_workflows',
                        'record_type',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'approval_workflows',
                        'module',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'approval_workflows',
                        'name',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'approval_workflows',
                        'organizationId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'role_permissions',
                        'organizationsId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'role_permissions',
                        'permissionId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'role_permissions',
                        'roleId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'departments',
                        'status',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'departments',
                        'parent_departmentId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'departments',
                        'code',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'departments',
                        'name',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'departments',
                        'organizationId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'provinces',
                        'status',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'provinces',
                        'code',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'provinces',
                        'name',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'provinces',
                        'organizationId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'organizations',
                        'name',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'permissions',
                        'name',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'roles',
                        'globalAccess',
                        { transaction }
                    );
                
            
                
            
                
                    await queryInterface.removeColumn(
                        'roles',
                        'role_customization',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'roles',
                        'name',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'users',
                        'organizationsId',
                        { 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('compliance_alerts', { transaction });
                
            
                
                    await queryInterface.dropTable('documents', { transaction });
                
            
                
                    await queryInterface.dropTable('ledger_entries', { transaction });
                
            
                
                    await queryInterface.dropTable('obligations', { transaction });
                
            
                
                    await queryInterface.dropTable('payments', { transaction });
                
            
                
                    await queryInterface.dropTable('payment_batches', { transaction });
                
            
                
                    await queryInterface.dropTable('payment_requests', { transaction });
                
            
                
                    await queryInterface.dropTable('invoices', { transaction });
                
            
                
                    await queryInterface.dropTable('expense_categories', { transaction });
                
            
                
                    await queryInterface.dropTable('grant_tranches', { transaction });
                
            
                
                    await queryInterface.dropTable('grant_evaluations', { transaction });
                
            
                
                    await queryInterface.dropTable('grant_applications', { transaction });
                
            
                
                    await queryInterface.dropTable('beneficiaries', { transaction });
                
            
                
                    await queryInterface.dropTable('grants', { transaction });
                
            
                
                    await queryInterface.dropTable('contract_milestones', { transaction });
                
            
                
                    await queryInterface.dropTable('contract_amendments', { transaction });
                
            
                
                    await queryInterface.dropTable('contracts', { transaction });
                
            
                
                    await queryInterface.dropTable('field_verifications', { transaction });
                
            
                
                    await queryInterface.dropTable('issues', { transaction });
                
            
                
                    await queryInterface.dropTable('risks', { transaction });
                
            
                
                    await queryInterface.dropTable('project_milestones', { transaction });
                
            
                
                    await queryInterface.dropTable('projects', { transaction });
                
            
                
                    await queryInterface.dropTable('programs', { transaction });
                
            
                
                    await queryInterface.dropTable('awards', { transaction });
                
            
                
                    await queryInterface.dropTable('bid_evaluations', { transaction });
                
            
                
                    await queryInterface.dropTable('bids', { transaction });
                
            
                
                    await queryInterface.dropTable('vendor_compliance_documents', { transaction });
                
            
                
                    await queryInterface.dropTable('vendors', { transaction });
                
            
                
                    await queryInterface.dropTable('tenders', { transaction });
                
            
                
                    await queryInterface.dropTable('requisitions', { transaction });
                
            
                
                    await queryInterface.dropTable('procurement_plans', { transaction });
                
            
                
                    await queryInterface.dropTable('budget_reallocations', { transaction });
                
            
                
                    await queryInterface.dropTable('allocations', { transaction });
                
            
                
                    await queryInterface.dropTable('budget_lines', { transaction });
                
            
                
                    await queryInterface.dropTable('budget_programs', { transaction });
                
            
                
                    await queryInterface.dropTable('funding_sources', { transaction });
                
            
                
                    await queryInterface.dropTable('fiscal_years', { transaction });
                
            
                
                    await queryInterface.dropTable('audit_logs', { transaction });
                
            
                
                    await queryInterface.dropTable('notifications', { transaction });
                
            
                
                    await queryInterface.dropTable('approvals', { transaction });
                
            
                
                    await queryInterface.dropTable('approval_steps', { transaction });
                
            
                
                    await queryInterface.dropTable('approval_workflows', { transaction });
                
            
                
                    await queryInterface.dropTable('role_permissions', { transaction });
                
            
                
                    await queryInterface.dropTable('departments', { transaction });
                
            
                
                    await queryInterface.dropTable('provinces', { transaction });
                
            
                
                    await queryInterface.dropTable('organizations', { 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;
        }
    }
};
