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('school_settings', {
                        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('pages', {
                        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('school_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('grades', {
                        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('streams', {
                        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('subjects', {
                        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('subject_offerings', {
                        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('staff_members', {
                        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('students', {
                        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('class_sections', {
                        id: {
                            type: Sequelize.DataTypes.UUID,
                            defaultValue: Sequelize.DataTypes.UUIDV4,
                            primaryKey: true,
                        },
                        createdById: {
                            type: Sequelize.DataTypes.UUID,
                            references: {
                                key: 'id',
                                model: 'users',
                            },
                        },
                        updatedById: {
                            type: Sequelize.DataTypes.UUID,
                            references: {
                                key: 'id',
                                model: 'users',
                            },
                        },
                        createdAt: { type: Sequelize.DataTypes.DATE },
                        updatedAt: { type: Sequelize.DataTypes.DATE },
                        deletedAt: { type: Sequelize.DataTypes.DATE },
                        importHash: {
                            type: Sequelize.DataTypes.STRING(255),
                            allowNull: true,
                          unique: true, 
                        },
                    }, { transaction });
                
            
                
                    await queryInterface.createTable('enrollments', {
                        id: {
                            type: Sequelize.DataTypes.UUID,
                            defaultValue: Sequelize.DataTypes.UUIDV4,
                            primaryKey: true,
                        },
                        createdById: {
                            type: Sequelize.DataTypes.UUID,
                            references: {
                                key: 'id',
                                model: 'users',
                            },
                        },
                        updatedById: {
                            type: Sequelize.DataTypes.UUID,
                            references: {
                                key: 'id',
                                model: 'users',
                            },
                        },
                        createdAt: { type: Sequelize.DataTypes.DATE },
                        updatedAt: { type: Sequelize.DataTypes.DATE },
                        deletedAt: { type: Sequelize.DataTypes.DATE },
                        importHash: {
                            type: Sequelize.DataTypes.STRING(255),
                            allowNull: true,
                          unique: true, 
                        },
                    }, { transaction });
                
            
                
                    await queryInterface.createTable('terms', {
                        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('events', {
                        id: {
                            type: Sequelize.DataTypes.UUID,
                            defaultValue: Sequelize.DataTypes.UUIDV4,
                            primaryKey: true,
                        },
                        createdById: {
                            type: Sequelize.DataTypes.UUID,
                            references: {
                                key: 'id',
                                model: 'users',
                            },
                        },
                        updatedById: {
                            type: Sequelize.DataTypes.UUID,
                            references: {
                                key: 'id',
                                model: 'users',
                            },
                        },
                        createdAt: { type: Sequelize.DataTypes.DATE },
                        updatedAt: { type: Sequelize.DataTypes.DATE },
                        deletedAt: { type: Sequelize.DataTypes.DATE },
                        importHash: {
                            type: Sequelize.DataTypes.STRING(255),
                            allowNull: true,
                          unique: true, 
                        },
                    }, { transaction });
                
            
                
                    await queryInterface.createTable('announcements', {
                        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('news_posts', {
                        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('galleries', {
                        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('study_materials', {
                        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('exams', {
                        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('exam_results', {
                        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('attendance_sessions', {
                        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('attendance_records', {
                        id: {
                            type: Sequelize.DataTypes.UUID,
                            defaultValue: Sequelize.DataTypes.UUIDV4,
                            primaryKey: true,
                        },
                        createdById: {
                            type: Sequelize.DataTypes.UUID,
                            references: {
                                key: 'id',
                                model: 'users',
                            },
                        },
                        updatedById: {
                            type: Sequelize.DataTypes.UUID,
                            references: {
                                key: 'id',
                                model: 'users',
                            },
                        },
                        createdAt: { type: Sequelize.DataTypes.DATE },
                        updatedAt: { type: Sequelize.DataTypes.DATE },
                        deletedAt: { type: Sequelize.DataTypes.DATE },
                        importHash: {
                            type: Sequelize.DataTypes.STRING(255),
                            allowNull: true,
                          unique: true, 
                        },
                    }, { transaction });
                
            
                
                    await queryInterface.createTable('class_schedules', {
                        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('assignments', {
                        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('assignment_submissions', {
                        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('lesson_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('messages', {
                        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('admission_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('contact_messages', {
                        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('alumni', {
                        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('school_statistics', {
                        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('exam_performance_summaries', {
                        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('top_student_features', {
                        id: {
                            type: Sequelize.DataTypes.UUID,
                            defaultValue: Sequelize.DataTypes.UUIDV4,
                            primaryKey: true,
                        },
                        createdById: {
                            type: Sequelize.DataTypes.UUID,
                            references: {
                                key: 'id',
                                model: 'users',
                            },
                        },
                        updatedById: {
                            type: Sequelize.DataTypes.UUID,
                            references: {
                                key: 'id',
                                model: 'users',
                            },
                        },
                        createdAt: { type: Sequelize.DataTypes.DATE },
                        updatedAt: { type: Sequelize.DataTypes.DATE },
                        deletedAt: { type: Sequelize.DataTypes.DATE },
                        importHash: {
                            type: Sequelize.DataTypes.STRING(255),
                            allowNull: true,
                          unique: true, 
                        },
                    }, { transaction });
                
            
                
                    
                    await queryInterface.addColumn(
                      'users',
                      'firstName',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'users',
                      'lastName',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'users',
                      'phoneNumber',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'users',
                      'email',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'users',
                      'disabled',
                      {
                          type: Sequelize.DataTypes.BOOLEAN,
                          
                            defaultValue: false,
                            allowNull: false,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
            
                
                    
                    await queryInterface.addColumn(
                      'users',
                      'password',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'users',
                      'emailVerified',
                      {
                          type: Sequelize.DataTypes.BOOLEAN,
                          
                            defaultValue: false,
                            allowNull: false,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'users',
                      'emailVerificationToken',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'users',
                      'emailVerificationTokenExpiresAt',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'users',
                      'passwordResetToken',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'users',
                      'passwordResetTokenExpiresAt',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'users',
                      'provider',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'users',
                      'app_roleId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'roles',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
            
                
                    
                    await queryInterface.addColumn(
                      'roles',
                      'name',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'roles',
                      'role_customization',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
            
                
                    
                    await queryInterface.addColumn(
                      'permissions',
                      'name',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'school_settings',
                      'school_name_om',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'school_settings',
                      'school_name_am',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'school_settings',
                      'school_name_en',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
            
                
            
                
                    
                    await queryInterface.addColumn(
                      'school_settings',
                      'welcome_message_om',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'school_settings',
                      'welcome_message_am',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'school_settings',
                      'welcome_message_en',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'school_settings',
                      'address_text',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'school_settings',
                      'map_embed_url',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'school_settings',
                      'public_phone_numbers',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'school_settings',
                      'public_emails',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'school_settings',
                      'social_links',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'pages',
                      'page_type',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['about_history','about_mission_vision_values','about_principal_message','about_facilities','about_achievements','parents_information','student_guide','admissions','contact','alumni'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'pages',
                      'title_om',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'pages',
                      'title_am',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'pages',
                      'title_en',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'pages',
                      'content_om',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'pages',
                      'content_am',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'pages',
                      'content_en',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
            
                
                    
                    await queryInterface.addColumn(
                      'pages',
                      'published',
                      {
                          type: Sequelize.DataTypes.BOOLEAN,
                          
                            defaultValue: false,
                            allowNull: false,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'pages',
                      'published_at',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'school_years',
                      'name',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'school_years',
                      'starts_at',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'school_years',
                      'ends_at',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'school_years',
                      'current',
                      {
                          type: Sequelize.DataTypes.BOOLEAN,
                          
                            defaultValue: false,
                            allowNull: false,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'grades',
                      'grade_number',
                      {
                          type: Sequelize.DataTypes.INTEGER,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'grades',
                      'level',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['high_school','preparatory'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'grades',
                      'label',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'streams',
                      'name_om',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'streams',
                      'name_am',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'streams',
                      'name_en',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'streams',
                      'stream_type',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['natural','social','general'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'subjects',
                      'name_om',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'subjects',
                      'name_am',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'subjects',
                      'name_en',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'subjects',
                      'overview_om',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'subjects',
                      'overview_am',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'subjects',
                      'overview_en',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'subjects',
                      'textbook_references',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'subjects',
                      'active',
                      {
                          type: Sequelize.DataTypes.BOOLEAN,
                          
                            defaultValue: false,
                            allowNull: false,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'subject_offerings',
                      'subjectId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'subjects',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'subject_offerings',
                      'gradeId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'grades',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'subject_offerings',
                      'streamId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'streams',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'subject_offerings',
                      'learning_objectives_om',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'subject_offerings',
                      'learning_objectives_am',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'subject_offerings',
                      'learning_objectives_en',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'subject_offerings',
                      'topics_outline',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'subject_offerings',
                      'responsible_teacherId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'staff_members',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'staff_members',
                      'userId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'users',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'staff_members',
                      'full_name',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'staff_members',
                      'staff_role',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['principal','vice_principal','teacher','registrar','librarian','admin_staff','it_support'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'staff_members',
                      'bio',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
            
                
                    
                    await queryInterface.addColumn(
                      'staff_members',
                      'phone_number',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'staff_members',
                      'email',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
            
                
                    
                    await queryInterface.addColumn(
                      'staff_members',
                      'public_profile',
                      {
                          type: Sequelize.DataTypes.BOOLEAN,
                          
                            defaultValue: false,
                            allowNull: false,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'students',
                      'userId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'users',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'students',
                      'full_name',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'students',
                      'student_code',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'students',
                      'gender',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['female','male'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'students',
                      'date_of_birth',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'students',
                      'current_gradeId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'grades',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'students',
                      'current_streamId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'streams',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'students',
                      'guardian_name',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'students',
                      'guardian_phone',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'students',
                      'address_text',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'students',
                      'active',
                      {
                          type: Sequelize.DataTypes.BOOLEAN,
                          
                            defaultValue: false,
                            allowNull: false,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'class_sections',
                      'name',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'class_sections',
                      'school_yearId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'school_years',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'class_sections',
                      'gradeId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'grades',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'class_sections',
                      'streamId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'streams',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'class_sections',
                      'homeroom_teacherId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'staff_members',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'class_sections',
                      'capacity',
                      {
                          type: Sequelize.DataTypes.INTEGER,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'enrollments',
                      'studentId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'students',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'enrollments',
                      'class_sectionId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'class_sections',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'enrollments',
                      'enrolled_at',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'enrollments',
                      'status',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['active','transferred','graduated','dropped'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'terms',
                      'school_yearId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'school_years',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'terms',
                      'term_name',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['term_1','term_2','term_3'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'terms',
                      'starts_at',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'terms',
                      'ends_at',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'events',
                      'title_om',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'events',
                      'title_am',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'events',
                      'title_en',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'events',
                      'description_om',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'events',
                      'description_am',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'events',
                      'description_en',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'events',
                      'starts_at',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'events',
                      'ends_at',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'events',
                      'location_text',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'events',
                      'visibility',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['public','staff_only','students_only'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
            
                
                    
                    await queryInterface.addColumn(
                      'events',
                      'published',
                      {
                          type: Sequelize.DataTypes.BOOLEAN,
                          
                            defaultValue: false,
                            allowNull: false,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'announcements',
                      'title_om',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'announcements',
                      'title_am',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'announcements',
                      'title_en',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'announcements',
                      'content_om',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'announcements',
                      'content_am',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'announcements',
                      'content_en',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'announcements',
                      'visibility',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['public','staff_only','students_only'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'announcements',
                      'publish_from',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'announcements',
                      'publish_until',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'announcements',
                      'pinned',
                      {
                          type: Sequelize.DataTypes.BOOLEAN,
                          
                            defaultValue: false,
                            allowNull: false,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
            
                
            
                
                    
                    await queryInterface.addColumn(
                      'news_posts',
                      'title_om',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'news_posts',
                      'title_am',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'news_posts',
                      'title_en',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'news_posts',
                      'excerpt_om',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'news_posts',
                      'excerpt_am',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'news_posts',
                      'excerpt_en',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'news_posts',
                      'content_om',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'news_posts',
                      'content_am',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'news_posts',
                      'content_en',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
            
                
                    
                    await queryInterface.addColumn(
                      'news_posts',
                      'authorId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'staff_members',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'news_posts',
                      'status',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['draft','published','archived'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'news_posts',
                      'published_at',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'galleries',
                      'title_om',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'galleries',
                      'title_am',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'galleries',
                      'title_en',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'galleries',
                      'description_om',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'galleries',
                      'description_am',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'galleries',
                      'description_en',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
            
                
                    
                    await queryInterface.addColumn(
                      'galleries',
                      'published',
                      {
                          type: Sequelize.DataTypes.BOOLEAN,
                          
                            defaultValue: false,
                            allowNull: false,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'galleries',
                      'published_at',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'study_materials',
                      'title_om',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'study_materials',
                      'title_am',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'study_materials',
                      'title_en',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'study_materials',
                      'material_type',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['past_exam_paper','revision_notes','practice_questions','reference_list','video_link','other'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'study_materials',
                      'gradeId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'grades',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'study_materials',
                      'subjectId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'subjects',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'study_materials',
                      'streamId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'streams',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'study_materials',
                      'description',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
            
                
                    
                    await queryInterface.addColumn(
                      'study_materials',
                      'external_url',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'study_materials',
                      'visibility',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['public','students_only'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'study_materials',
                      'uploaded_byId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'staff_members',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'study_materials',
                      'published_at',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'exams',
                      'name',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'exams',
                      'exam_type',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['monthly','midterm','final','national_grade_8','national_grade_10','national_grade_12'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'exams',
                      'school_yearId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'school_years',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'exams',
                      'termId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'terms',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'exams',
                      'gradeId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'grades',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'exams',
                      'streamId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'streams',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'exams',
                      'starts_at',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'exams',
                      'ends_at',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'exams',
                      'public_results',
                      {
                          type: Sequelize.DataTypes.BOOLEAN,
                          
                            defaultValue: false,
                            allowNull: false,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'exam_results',
                      'examId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'exams',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'exam_results',
                      'studentId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'students',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'exam_results',
                      'subjectId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'subjects',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'exam_results',
                      'score',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'exam_results',
                      'out_of',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'exam_results',
                      'result_status',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['draft','submitted','approved','published'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'exam_results',
                      'entered_byId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'staff_members',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'exam_results',
                      'entered_at',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'attendance_sessions',
                      'class_sectionId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'class_sections',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'attendance_sessions',
                      'subjectId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'subjects',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'attendance_sessions',
                      'teacherId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'staff_members',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'attendance_sessions',
                      'session_at',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'attendance_sessions',
                      'session_type',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['period','exam','homeroom'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'attendance_sessions',
                      'note',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'attendance_records',
                      'attendance_sessionId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'attendance_sessions',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'attendance_records',
                      'studentId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'students',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'attendance_records',
                      'status',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['present','absent','late','excused'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'attendance_records',
                      'remark',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'class_schedules',
                      'class_sectionId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'class_sections',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'class_schedules',
                      'subjectId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'subjects',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'class_schedules',
                      'teacherId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'staff_members',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'class_schedules',
                      'weekday',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['monday','tuesday','wednesday','thursday','friday','saturday'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'class_schedules',
                      'period_label',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'class_schedules',
                      'starts_at',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'class_schedules',
                      'ends_at',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'class_schedules',
                      'room',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'assignments',
                      'class_sectionId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'class_sections',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'assignments',
                      'subjectId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'subjects',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'assignments',
                      'teacherId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'staff_members',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'assignments',
                      'title',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'assignments',
                      'instructions',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
            
                
                    
                    await queryInterface.addColumn(
                      'assignments',
                      'assigned_at',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'assignments',
                      'due_at',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'assignments',
                      'visibility',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['students_only','public'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'assignment_submissions',
                      'assignmentId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'assignments',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'assignment_submissions',
                      'studentId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'students',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
            
                
                    
                    await queryInterface.addColumn(
                      'assignment_submissions',
                      'comment',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'assignment_submissions',
                      'submitted_at',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'assignment_submissions',
                      'status',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['submitted','reviewed','returned'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'assignment_submissions',
                      'grade_value',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'assignment_submissions',
                      'teacher_feedback',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'lesson_plans',
                      'teacherId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'staff_members',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'lesson_plans',
                      'class_sectionId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'class_sections',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'lesson_plans',
                      'subjectId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'subjects',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'lesson_plans',
                      'week_start_at',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'lesson_plans',
                      'week_end_at',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'lesson_plans',
                      'plan_content',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
            
                
                    
                    await queryInterface.addColumn(
                      'lesson_plans',
                      'status',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['draft','submitted','approved'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'messages',
                      'senderId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'users',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'messages',
                      'recipientId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'users',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'messages',
                      'subject',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'messages',
                      'body',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'messages',
                      'status',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['sent','read','archived'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'messages',
                      'sent_at',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'messages',
                      'read_at',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'admission_applications',
                      'entry_type',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['grade_9_entry','transfer'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'admission_applications',
                      'applicant_full_name',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'admission_applications',
                      'gender',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['female','male'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'admission_applications',
                      'date_of_birth',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'admission_applications',
                      'previous_school',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'admission_applications',
                      'requested_gradeId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'grades',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'admission_applications',
                      'requested_streamId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'streams',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'admission_applications',
                      'guardian_full_name',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'admission_applications',
                      'guardian_phone',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'admission_applications',
                      'guardian_email',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'admission_applications',
                      'address_text',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
            
                
                    
                    await queryInterface.addColumn(
                      'admission_applications',
                      'submitted_at',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'admission_applications',
                      'status',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['submitted','under_review','accepted','rejected','waitlisted'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'contact_messages',
                      'full_name',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'contact_messages',
                      'phone_number',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'contact_messages',
                      'email',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'contact_messages',
                      'topic',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['general','admissions','academics','results','technical'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'contact_messages',
                      'message',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'contact_messages',
                      'submitted_at',
                      {
                          type: Sequelize.DataTypes.DATE,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'contact_messages',
                      'status',
                      {
                          type: Sequelize.DataTypes.ENUM,
                          
                          
                            values: ['new','in_progress','resolved'],
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'alumni',
                      'full_name',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'alumni',
                      'graduation_year',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'alumni',
                      'current_role',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'alumni',
                      'organization',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'alumni',
                      'bio',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
            
                
                    
                    await queryInterface.addColumn(
                      'alumni',
                      'phone_number',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'alumni',
                      'email',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'alumni',
                      'notable',
                      {
                          type: Sequelize.DataTypes.BOOLEAN,
                          
                            defaultValue: false,
                            allowNull: false,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'alumni',
                      'published',
                      {
                          type: Sequelize.DataTypes.BOOLEAN,
                          
                            defaultValue: false,
                            allowNull: false,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'school_statistics',
                      'school_yearId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'school_years',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'school_statistics',
                      'student_count',
                      {
                          type: Sequelize.DataTypes.INTEGER,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'school_statistics',
                      'teacher_count',
                      {
                          type: Sequelize.DataTypes.INTEGER,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'school_statistics',
                      'pass_rate',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'school_statistics',
                      'notes',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'exam_performance_summaries',
                      'examId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'exams',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'exam_performance_summaries',
                      'average_score',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'exam_performance_summaries',
                      'highest_score',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'exam_performance_summaries',
                      'lowest_score',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'exam_performance_summaries',
                      'pass_rate',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'exam_performance_summaries',
                      'student_count',
                      {
                          type: Sequelize.DataTypes.INTEGER,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'exam_performance_summaries',
                      'published',
                      {
                          type: Sequelize.DataTypes.BOOLEAN,
                          
                            defaultValue: false,
                            allowNull: false,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'top_student_features',
                      'examId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'exams',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'top_student_features',
                      'studentId',
                      {
                          type: Sequelize.DataTypes.UUID,
                          
                          
                          
                            references: {
                                model: 'students',
                                key: 'id',
                            },
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'top_student_features',
                      'total_score',
                      {
                          type: Sequelize.DataTypes.DECIMAL,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'top_student_features',
                      'rank',
                      {
                          type: Sequelize.DataTypes.INTEGER,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'top_student_features',
                      'consent_to_publish',
                      {
                          type: Sequelize.DataTypes.BOOLEAN,
                          
                            defaultValue: false,
                            allowNull: false,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'top_student_features',
                      'published',
                      {
                          type: Sequelize.DataTypes.BOOLEAN,
                          
                            defaultValue: false,
                            allowNull: false,
                          
                          
                          
                      },
                      { transaction }
                    );
                
            
                
                    
                    await queryInterface.addColumn(
                      'top_student_features',
                      'note',
                      {
                          type: Sequelize.DataTypes.TEXT,
                          
                          
                          
                      },
                      { 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(
                        'top_student_features',
                        'note',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'top_student_features',
                        'published',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'top_student_features',
                        'consent_to_publish',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'top_student_features',
                        'rank',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'top_student_features',
                        'total_score',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'top_student_features',
                        'studentId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'top_student_features',
                        'examId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'exam_performance_summaries',
                        'published',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'exam_performance_summaries',
                        'student_count',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'exam_performance_summaries',
                        'pass_rate',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'exam_performance_summaries',
                        'lowest_score',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'exam_performance_summaries',
                        'highest_score',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'exam_performance_summaries',
                        'average_score',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'exam_performance_summaries',
                        'examId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'school_statistics',
                        'notes',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'school_statistics',
                        'pass_rate',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'school_statistics',
                        'teacher_count',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'school_statistics',
                        'student_count',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'school_statistics',
                        'school_yearId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'alumni',
                        'published',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'alumni',
                        'notable',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'alumni',
                        'email',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'alumni',
                        'phone_number',
                        { transaction }
                    );
                
            
                
            
                
                    await queryInterface.removeColumn(
                        'alumni',
                        'bio',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'alumni',
                        'organization',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'alumni',
                        'current_role',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'alumni',
                        'graduation_year',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'alumni',
                        'full_name',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'contact_messages',
                        'status',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'contact_messages',
                        'submitted_at',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'contact_messages',
                        'message',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'contact_messages',
                        'topic',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'contact_messages',
                        'email',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'contact_messages',
                        'phone_number',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'contact_messages',
                        'full_name',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'admission_applications',
                        'status',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'admission_applications',
                        'submitted_at',
                        { transaction }
                    );
                
            
                
            
                
                    await queryInterface.removeColumn(
                        'admission_applications',
                        'address_text',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'admission_applications',
                        'guardian_email',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'admission_applications',
                        'guardian_phone',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'admission_applications',
                        'guardian_full_name',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'admission_applications',
                        'requested_streamId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'admission_applications',
                        'requested_gradeId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'admission_applications',
                        'previous_school',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'admission_applications',
                        'date_of_birth',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'admission_applications',
                        'gender',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'admission_applications',
                        'applicant_full_name',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'admission_applications',
                        'entry_type',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'messages',
                        'read_at',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'messages',
                        'sent_at',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'messages',
                        'status',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'messages',
                        'body',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'messages',
                        'subject',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'messages',
                        'recipientId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'messages',
                        'senderId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'lesson_plans',
                        'status',
                        { transaction }
                    );
                
            
                
            
                
                    await queryInterface.removeColumn(
                        'lesson_plans',
                        'plan_content',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'lesson_plans',
                        'week_end_at',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'lesson_plans',
                        'week_start_at',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'lesson_plans',
                        'subjectId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'lesson_plans',
                        'class_sectionId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'lesson_plans',
                        'teacherId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'assignment_submissions',
                        'teacher_feedback',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'assignment_submissions',
                        'grade_value',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'assignment_submissions',
                        'status',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'assignment_submissions',
                        'submitted_at',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'assignment_submissions',
                        'comment',
                        { transaction }
                    );
                
            
                
            
                
                    await queryInterface.removeColumn(
                        'assignment_submissions',
                        'studentId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'assignment_submissions',
                        'assignmentId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'assignments',
                        'visibility',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'assignments',
                        'due_at',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'assignments',
                        'assigned_at',
                        { transaction }
                    );
                
            
                
            
                
                    await queryInterface.removeColumn(
                        'assignments',
                        'instructions',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'assignments',
                        'title',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'assignments',
                        'teacherId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'assignments',
                        'subjectId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'assignments',
                        'class_sectionId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'class_schedules',
                        'room',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'class_schedules',
                        'ends_at',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'class_schedules',
                        'starts_at',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'class_schedules',
                        'period_label',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'class_schedules',
                        'weekday',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'class_schedules',
                        'teacherId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'class_schedules',
                        'subjectId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'class_schedules',
                        'class_sectionId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'attendance_records',
                        'remark',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'attendance_records',
                        'status',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'attendance_records',
                        'studentId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'attendance_records',
                        'attendance_sessionId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'attendance_sessions',
                        'note',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'attendance_sessions',
                        'session_type',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'attendance_sessions',
                        'session_at',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'attendance_sessions',
                        'teacherId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'attendance_sessions',
                        'subjectId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'attendance_sessions',
                        'class_sectionId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'exam_results',
                        'entered_at',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'exam_results',
                        'entered_byId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'exam_results',
                        'result_status',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'exam_results',
                        'out_of',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'exam_results',
                        'score',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'exam_results',
                        'subjectId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'exam_results',
                        'studentId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'exam_results',
                        'examId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'exams',
                        'public_results',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'exams',
                        'ends_at',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'exams',
                        'starts_at',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'exams',
                        'streamId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'exams',
                        'gradeId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'exams',
                        'termId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'exams',
                        'school_yearId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'exams',
                        'exam_type',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'exams',
                        'name',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'study_materials',
                        'published_at',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'study_materials',
                        'uploaded_byId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'study_materials',
                        'visibility',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'study_materials',
                        'external_url',
                        { transaction }
                    );
                
            
                
            
                
                    await queryInterface.removeColumn(
                        'study_materials',
                        'description',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'study_materials',
                        'streamId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'study_materials',
                        'subjectId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'study_materials',
                        'gradeId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'study_materials',
                        'material_type',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'study_materials',
                        'title_en',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'study_materials',
                        'title_am',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'study_materials',
                        'title_om',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'galleries',
                        'published_at',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'galleries',
                        'published',
                        { transaction }
                    );
                
            
                
            
                
                    await queryInterface.removeColumn(
                        'galleries',
                        'description_en',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'galleries',
                        'description_am',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'galleries',
                        'description_om',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'galleries',
                        'title_en',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'galleries',
                        'title_am',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'galleries',
                        'title_om',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'news_posts',
                        'published_at',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'news_posts',
                        'status',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'news_posts',
                        'authorId',
                        { transaction }
                    );
                
            
                
            
                
                    await queryInterface.removeColumn(
                        'news_posts',
                        'content_en',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'news_posts',
                        'content_am',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'news_posts',
                        'content_om',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'news_posts',
                        'excerpt_en',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'news_posts',
                        'excerpt_am',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'news_posts',
                        'excerpt_om',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'news_posts',
                        'title_en',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'news_posts',
                        'title_am',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'news_posts',
                        'title_om',
                        { transaction }
                    );
                
            
                
            
                
            
                
                    await queryInterface.removeColumn(
                        'announcements',
                        'pinned',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'announcements',
                        'publish_until',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'announcements',
                        'publish_from',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'announcements',
                        'visibility',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'announcements',
                        'content_en',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'announcements',
                        'content_am',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'announcements',
                        'content_om',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'announcements',
                        'title_en',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'announcements',
                        'title_am',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'announcements',
                        'title_om',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'events',
                        'published',
                        { transaction }
                    );
                
            
                
            
                
                    await queryInterface.removeColumn(
                        'events',
                        'visibility',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'events',
                        'location_text',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'events',
                        'ends_at',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'events',
                        'starts_at',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'events',
                        'description_en',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'events',
                        'description_am',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'events',
                        'description_om',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'events',
                        'title_en',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'events',
                        'title_am',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'events',
                        'title_om',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'terms',
                        'ends_at',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'terms',
                        'starts_at',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'terms',
                        'term_name',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'terms',
                        'school_yearId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'enrollments',
                        'status',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'enrollments',
                        'enrolled_at',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'enrollments',
                        'class_sectionId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'enrollments',
                        'studentId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'class_sections',
                        'capacity',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'class_sections',
                        'homeroom_teacherId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'class_sections',
                        'streamId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'class_sections',
                        'gradeId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'class_sections',
                        'school_yearId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'class_sections',
                        'name',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'students',
                        'active',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'students',
                        'address_text',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'students',
                        'guardian_phone',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'students',
                        'guardian_name',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'students',
                        'current_streamId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'students',
                        'current_gradeId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'students',
                        'date_of_birth',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'students',
                        'gender',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'students',
                        'student_code',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'students',
                        'full_name',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'students',
                        'userId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'staff_members',
                        'public_profile',
                        { transaction }
                    );
                
            
                
            
                
                    await queryInterface.removeColumn(
                        'staff_members',
                        'email',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'staff_members',
                        'phone_number',
                        { transaction }
                    );
                
            
                
            
                
                    await queryInterface.removeColumn(
                        'staff_members',
                        'bio',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'staff_members',
                        'staff_role',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'staff_members',
                        'full_name',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'staff_members',
                        'userId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'subject_offerings',
                        'responsible_teacherId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'subject_offerings',
                        'topics_outline',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'subject_offerings',
                        'learning_objectives_en',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'subject_offerings',
                        'learning_objectives_am',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'subject_offerings',
                        'learning_objectives_om',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'subject_offerings',
                        'streamId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'subject_offerings',
                        'gradeId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'subject_offerings',
                        'subjectId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'subjects',
                        'active',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'subjects',
                        'textbook_references',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'subjects',
                        'overview_en',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'subjects',
                        'overview_am',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'subjects',
                        'overview_om',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'subjects',
                        'name_en',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'subjects',
                        'name_am',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'subjects',
                        'name_om',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'streams',
                        'stream_type',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'streams',
                        'name_en',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'streams',
                        'name_am',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'streams',
                        'name_om',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'grades',
                        'label',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'grades',
                        'level',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'grades',
                        'grade_number',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'school_years',
                        'current',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'school_years',
                        'ends_at',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'school_years',
                        'starts_at',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'school_years',
                        'name',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'pages',
                        'published_at',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'pages',
                        'published',
                        { transaction }
                    );
                
            
                
            
                
                    await queryInterface.removeColumn(
                        'pages',
                        'content_en',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'pages',
                        'content_am',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'pages',
                        'content_om',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'pages',
                        'title_en',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'pages',
                        'title_am',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'pages',
                        'title_om',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'pages',
                        'page_type',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'school_settings',
                        'social_links',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'school_settings',
                        'public_emails',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'school_settings',
                        'public_phone_numbers',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'school_settings',
                        'map_embed_url',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'school_settings',
                        'address_text',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'school_settings',
                        'welcome_message_en',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'school_settings',
                        'welcome_message_am',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'school_settings',
                        'welcome_message_om',
                        { transaction }
                    );
                
            
                
            
                
            
                
                    await queryInterface.removeColumn(
                        'school_settings',
                        'school_name_en',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'school_settings',
                        'school_name_am',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'school_settings',
                        'school_name_om',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'permissions',
                        'name',
                        { transaction }
                    );
                
            
                
            
                
                    await queryInterface.removeColumn(
                        'roles',
                        'role_customization',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'roles',
                        'name',
                        { transaction }
                    );
                
            
                
            
                
                    await queryInterface.removeColumn(
                        'users',
                        'app_roleId',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'users',
                        'provider',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'users',
                        'passwordResetTokenExpiresAt',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'users',
                        'passwordResetToken',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'users',
                        'emailVerificationTokenExpiresAt',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'users',
                        'emailVerificationToken',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'users',
                        'emailVerified',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'users',
                        'password',
                        { transaction }
                    );
                
            
                
            
                
                    await queryInterface.removeColumn(
                        'users',
                        'disabled',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'users',
                        'email',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'users',
                        'phoneNumber',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'users',
                        'lastName',
                        { transaction }
                    );
                
            
                
                    await queryInterface.removeColumn(
                        'users',
                        'firstName',
                        { transaction }
                    );
                
            
                
                    await queryInterface.dropTable('top_student_features', { transaction });
                
            
                
                    await queryInterface.dropTable('exam_performance_summaries', { transaction });
                
            
                
                    await queryInterface.dropTable('school_statistics', { transaction });
                
            
                
                    await queryInterface.dropTable('alumni', { transaction });
                
            
                
                    await queryInterface.dropTable('contact_messages', { transaction });
                
            
                
                    await queryInterface.dropTable('admission_applications', { transaction });
                
            
                
                    await queryInterface.dropTable('messages', { transaction });
                
            
                
                    await queryInterface.dropTable('lesson_plans', { transaction });
                
            
                
                    await queryInterface.dropTable('assignment_submissions', { transaction });
                
            
                
                    await queryInterface.dropTable('assignments', { transaction });
                
            
                
                    await queryInterface.dropTable('class_schedules', { transaction });
                
            
                
                    await queryInterface.dropTable('attendance_records', { transaction });
                
            
                
                    await queryInterface.dropTable('attendance_sessions', { transaction });
                
            
                
                    await queryInterface.dropTable('exam_results', { transaction });
                
            
                
                    await queryInterface.dropTable('exams', { transaction });
                
            
                
                    await queryInterface.dropTable('study_materials', { transaction });
                
            
                
                    await queryInterface.dropTable('galleries', { transaction });
                
            
                
                    await queryInterface.dropTable('news_posts', { transaction });
                
            
                
                    await queryInterface.dropTable('announcements', { transaction });
                
            
                
                    await queryInterface.dropTable('events', { transaction });
                
            
                
                    await queryInterface.dropTable('terms', { transaction });
                
            
                
                    await queryInterface.dropTable('enrollments', { transaction });
                
            
                
                    await queryInterface.dropTable('class_sections', { transaction });
                
            
                
                    await queryInterface.dropTable('students', { transaction });
                
            
                
                    await queryInterface.dropTable('staff_members', { transaction });
                
            
                
                    await queryInterface.dropTable('subject_offerings', { transaction });
                
            
                
                    await queryInterface.dropTable('subjects', { transaction });
                
            
                
                    await queryInterface.dropTable('streams', { transaction });
                
            
                
                    await queryInterface.dropTable('grades', { transaction });
                
            
                
                    await queryInterface.dropTable('school_years', { transaction });
                
            
                
                    await queryInterface.dropTable('pages', { transaction });
                
            
                
                    await queryInterface.dropTable('school_settings', { 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;
        }
    }
};
