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('audit_logs', {
                        id: {
                            type: Sequelize.DataTypes.UUID,
                            defaultValue: Sequelize.DataTypes.UUIDV4,
                            primaryKey: true,
                        },
                        createdById: {
                            type: Sequelize.DataTypes.UUID,
                            references: {
                                key: 'id',
                                model: 'users',
                            },
                        },
                        updatedById: {
                            type: Sequelize.DataTypes.UUID,
                            references: {
                                key: 'id',
                                model: 'users',
                            },
                        },
                        createdAt: { type: Sequelize.DataTypes.DATE },
                        updatedAt: { type: Sequelize.DataTypes.DATE },
                        deletedAt: { type: Sequelize.DataTypes.DATE },
                        importHash: {
                            type: Sequelize.DataTypes.STRING(255),
                            allowNull: true,
                          unique: true, 
                        },
                    }, { transaction });

                    await queryInterface.createTable('beds', {
                        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('booking_beds', {
                        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('booking_upsells', {
                        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('bookings', {
                        id: {
                            type: Sequelize.DataTypes.UUID,
                            defaultValue: Sequelize.DataTypes.UUIDV4,
                            primaryKey: true,
                        },
                        createdById: {
                            type: Sequelize.DataTypes.UUID,
                            references: {
                                key: 'id',
                                model: 'users',
                            },
                        },
                        updatedById: {
                            type: Sequelize.DataTypes.UUID,
                            references: {
                                key: 'id',
                                model: 'users',
                            },
                        },
                        createdAt: { type: Sequelize.DataTypes.DATE },
                        updatedAt: { type: Sequelize.DataTypes.DATE },
                        deletedAt: { type: Sequelize.DataTypes.DATE },
                        importHash: {
                            type: Sequelize.DataTypes.STRING(255),
                            allowNull: true,
                          unique: true, 
                        },
                    }, { transaction });

                    await queryInterface.createTable('coupons', {
                        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('event_orders', {
                        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('event_ticket_types', {
                        id: {
                            type: Sequelize.DataTypes.UUID,
                            defaultValue: Sequelize.DataTypes.UUIDV4,
                            primaryKey: true,
                        },
                        createdById: {
                            type: Sequelize.DataTypes.UUID,
                            references: {
                                key: 'id',
                                model: 'users',
                            },
                        },
                        updatedById: {
                            type: Sequelize.DataTypes.UUID,
                            references: {
                                key: 'id',
                                model: 'users',
                            },
                        },
                        createdAt: { type: Sequelize.DataTypes.DATE },
                        updatedAt: { type: Sequelize.DataTypes.DATE },
                        deletedAt: { type: Sequelize.DataTypes.DATE },
                        importHash: {
                            type: Sequelize.DataTypes.STRING(255),
                            allowNull: true,
                          unique: true, 
                        },
                    }, { transaction });

                    await queryInterface.createTable('event_tickets', {
                        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('housekeeping_tasks', {
                        id: {
                            type: Sequelize.DataTypes.UUID,
                            defaultValue: Sequelize.DataTypes.UUIDV4,
                            primaryKey: true,
                        },
                        createdById: {
                            type: Sequelize.DataTypes.UUID,
                            references: {
                                key: 'id',
                                model: 'users',
                            },
                        },
                        updatedById: {
                            type: Sequelize.DataTypes.UUID,
                            references: {
                                key: 'id',
                                model: 'users',
                            },
                        },
                        createdAt: { type: Sequelize.DataTypes.DATE },
                        updatedAt: { type: Sequelize.DataTypes.DATE },
                        deletedAt: { type: Sequelize.DataTypes.DATE },
                        importHash: {
                            type: Sequelize.DataTypes.STRING(255),
                            allowNull: true,
                          unique: true, 
                        },
                    }, { transaction });

                    await queryInterface.createTable('inventory_dates', {
                        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('maintenance_tickets', {
                        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('message_threads', {
                        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('payments', {
                        id: {
                            type: Sequelize.DataTypes.UUID,
                            defaultValue: Sequelize.DataTypes.UUIDV4,
                            primaryKey: true,
                        },
                        createdById: {
                            type: Sequelize.DataTypes.UUID,
                            references: {
                                key: 'id',
                                model: 'users',
                            },
                        },
                        updatedById: {
                            type: Sequelize.DataTypes.UUID,
                            references: {
                                key: 'id',
                                model: 'users',
                            },
                        },
                        createdAt: { type: Sequelize.DataTypes.DATE },
                        updatedAt: { type: Sequelize.DataTypes.DATE },
                        deletedAt: { type: Sequelize.DataTypes.DATE },
                        importHash: {
                            type: Sequelize.DataTypes.STRING(255),
                            allowNull: true,
                          unique: true, 
                        },
                    }, { transaction });

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

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

                    await queryInterface.createTable('rooms', {
                        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('upsells', {
                        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('user_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('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('properties', {
                        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(
                      'audit_logs',
                      'propertyId',
                      {
                          type: Sequelize.DataTypes.UUID,

                            references: {
                                model: 'properties',
                                key: 'id',
                            },

                      },
                      { transaction }
                    );

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

                            references: {
                                model: 'users',
                                key: 'id',
                            },

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'audit_logs',
                      'action',
                      {
                          type: Sequelize.DataTypes.TEXT,

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'audit_logs',
                      'entity',
                      {
                          type: Sequelize.DataTypes.TEXT,

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'audit_logs',
                      'entity_id',
                      {
                          type: Sequelize.DataTypes.INTEGER,

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'audit_logs',
                      'diff_json',
                      {
                          type: Sequelize.DataTypes.TEXT,

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'beds',
                      'propertyId',
                      {
                          type: Sequelize.DataTypes.UUID,

                            references: {
                                model: 'properties',
                                key: 'id',
                            },

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'beds',
                      'roomId',
                      {
                          type: Sequelize.DataTypes.UUID,

                            references: {
                                model: 'rooms',
                                key: 'id',
                            },

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'beds',
                      'code',
                      {
                          type: Sequelize.DataTypes.TEXT,

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'beds',
                      'is_bunk',
                      {
                          type: Sequelize.DataTypes.BOOLEAN,

                            defaultValue: false,
                            allowNull: false,

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'beds',
                      'is_lower',
                      {
                          type: Sequelize.DataTypes.BOOLEAN,

                            defaultValue: false,
                            allowNull: false,

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'beds',
                      'is_active',
                      {
                          type: Sequelize.DataTypes.BOOLEAN,

                            defaultValue: false,
                            allowNull: false,

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'booking_beds',
                      'bookingId',
                      {
                          type: Sequelize.DataTypes.UUID,

                            references: {
                                model: 'bookings',
                                key: 'id',
                            },

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'booking_beds',
                      'bedId',
                      {
                          type: Sequelize.DataTypes.UUID,

                            references: {
                                model: 'beds',
                                key: 'id',
                            },

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'booking_beds',
                      'room_typeId',
                      {
                          type: Sequelize.DataTypes.UUID,

                            references: {
                                model: 'room_types',
                                key: 'id',
                            },

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'booking_beds',
                      'date',
                      {
                          type: Sequelize.DataTypes.DATE,

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'booking_upsells',
                      'bookingId',
                      {
                          type: Sequelize.DataTypes.UUID,

                            references: {
                                model: 'bookings',
                                key: 'id',
                            },

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'booking_upsells',
                      'upsellId',
                      {
                          type: Sequelize.DataTypes.UUID,

                            references: {
                                model: 'upsells',
                                key: 'id',
                            },

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'booking_upsells',
                      'quantity',
                      {
                          type: Sequelize.DataTypes.INTEGER,

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'booking_upsells',
                      'unit_price',
                      {
                          type: Sequelize.DataTypes.DECIMAL,

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'booking_upsells',
                      'currency',
                      {
                          type: Sequelize.DataTypes.TEXT,

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'booking_upsells',
                      'scheduled_for',
                      {
                          type: Sequelize.DataTypes.DATE,

                      },
                      { transaction }
                    );

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

                            values: ['pending','completed','cancelled'],

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'bookings',
                      'propertyId',
                      {
                          type: Sequelize.DataTypes.UUID,

                            references: {
                                model: 'properties',
                                key: 'id',
                            },

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'bookings',
                      'code',
                      {
                          type: Sequelize.DataTypes.TEXT,

                      },
                      { transaction }
                    );

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

                            references: {
                                model: 'users',
                                key: 'id',
                            },

                      },
                      { transaction }
                    );

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

                            values: ['created','confirmed','checked_in','checked_out','cancelled','no_show'],

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'bookings',
                      'checkin_date',
                      {
                          type: Sequelize.DataTypes.DATE,

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'bookings',
                      'checkout_date',
                      {
                          type: Sequelize.DataTypes.DATE,

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'bookings',
                      'guests_count',
                      {
                          type: Sequelize.DataTypes.INTEGER,

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'bookings',
                      'total_amount',
                      {
                          type: Sequelize.DataTypes.DECIMAL,

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'bookings',
                      'currency',
                      {
                          type: Sequelize.DataTypes.TEXT,

                      },
                      { transaction }
                    );

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

                            values: ['pending','completed','failed'],

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'bookings',
                      'stripe_payment_intent_id',
                      {
                          type: Sequelize.DataTypes.TEXT,

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'coupons',
                      'propertyId',
                      {
                          type: Sequelize.DataTypes.UUID,

                            references: {
                                model: 'properties',
                                key: 'id',
                            },

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'coupons',
                      'code',
                      {
                          type: Sequelize.DataTypes.TEXT,

                      },
                      { transaction }
                    );

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

                            values: ['amount_off','percent_off'],

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'coupons',
                      'value',
                      {
                          type: Sequelize.DataTypes.DECIMAL,

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'coupons',
                      'currency',
                      {
                          type: Sequelize.DataTypes.TEXT,

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'coupons',
                      'starts_at',
                      {
                          type: Sequelize.DataTypes.DATE,

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'coupons',
                      'ends_at',
                      {
                          type: Sequelize.DataTypes.DATE,

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'coupons',
                      'max_redemptions',
                      {
                          type: Sequelize.DataTypes.INTEGER,

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'coupons',
                      'times_redeemed',
                      {
                          type: Sequelize.DataTypes.INTEGER,

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'event_orders',
                      'propertyId',
                      {
                          type: Sequelize.DataTypes.UUID,

                            references: {
                                model: 'properties',
                                key: 'id',
                            },

                      },
                      { transaction }
                    );

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

                            references: {
                                model: 'users',
                                key: 'id',
                            },

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'event_orders',
                      'bookingId',
                      {
                          type: Sequelize.DataTypes.UUID,

                            references: {
                                model: 'bookings',
                                key: 'id',
                            },

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'event_orders',
                      'total_amount',
                      {
                          type: Sequelize.DataTypes.DECIMAL,

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'event_orders',
                      'currency',
                      {
                          type: Sequelize.DataTypes.TEXT,

                      },
                      { transaction }
                    );

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

                            values: ['pending','completed','failed'],

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'event_orders',
                      'stripe_payment_intent_id',
                      {
                          type: Sequelize.DataTypes.TEXT,

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'event_ticket_types',
                      'eventId',
                      {
                          type: Sequelize.DataTypes.UUID,

                            references: {
                                model: 'events',
                                key: 'id',
                            },

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'event_ticket_types',
                      'name',
                      {
                          type: Sequelize.DataTypes.TEXT,

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'event_ticket_types',
                      'price',
                      {
                          type: Sequelize.DataTypes.DECIMAL,

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'event_ticket_types',
                      'currency',
                      {
                          type: Sequelize.DataTypes.TEXT,

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'event_ticket_types',
                      'capacity_overrides',
                      {
                          type: Sequelize.DataTypes.INTEGER,

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'event_tickets',
                      'event_orderId',
                      {
                          type: Sequelize.DataTypes.UUID,

                            references: {
                                model: 'event_orders',
                                key: 'id',
                            },

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'event_tickets',
                      'ticket_typeId',
                      {
                          type: Sequelize.DataTypes.UUID,

                            references: {
                                model: 'event_ticket_types',
                                key: 'id',
                            },

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'event_tickets',
                      'code',
                      {
                          type: Sequelize.DataTypes.TEXT,

                      },
                      { transaction }
                    );

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

                            values: ['valid','used','refunded'],

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'event_tickets',
                      'qr_svg',
                      {
                          type: Sequelize.DataTypes.TEXT,

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'event_tickets',
                      'issued_to_name',
                      {
                          type: Sequelize.DataTypes.TEXT,

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'event_tickets',
                      'issued_to_email',
                      {
                          type: Sequelize.DataTypes.TEXT,

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'events',
                      'propertyId',
                      {
                          type: Sequelize.DataTypes.UUID,

                            references: {
                                model: 'properties',
                                key: 'id',
                            },

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'events',
                      'name',
                      {
                          type: Sequelize.DataTypes.TEXT,

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'events',
                      'description',
                      {
                          type: Sequelize.DataTypes.TEXT,

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'events',
                      'start_at',
                      {
                          type: Sequelize.DataTypes.DATE,

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'events',
                      'end_at',
                      {
                          type: Sequelize.DataTypes.DATE,

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'events',
                      'capacity',
                      {
                          type: Sequelize.DataTypes.INTEGER,

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'events',
                      'is_active',
                      {
                          type: Sequelize.DataTypes.BOOLEAN,

                            defaultValue: false,
                            allowNull: false,

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'housekeeping_tasks',
                      'propertyId',
                      {
                          type: Sequelize.DataTypes.UUID,

                            references: {
                                model: 'properties',
                                key: 'id',
                            },

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'housekeeping_tasks',
                      'roomId',
                      {
                          type: Sequelize.DataTypes.UUID,

                            references: {
                                model: 'rooms',
                                key: 'id',
                            },

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'housekeeping_tasks',
                      'due_date',
                      {
                          type: Sequelize.DataTypes.DATE,

                      },
                      { transaction }
                    );

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

                            values: ['turnover','deep_clean','linen','inspection'],

                      },
                      { transaction }
                    );

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

                            values: ['to_do','in_progress','done'],

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'housekeeping_tasks',
                      'assignee_userId',
                      {
                          type: Sequelize.DataTypes.UUID,

                            references: {
                                model: 'users',
                                key: 'id',
                            },

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'housekeeping_tasks',
                      'notes',
                      {
                          type: Sequelize.DataTypes.TEXT,

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'inventory_dates',
                      'propertyId',
                      {
                          type: Sequelize.DataTypes.UUID,

                            references: {
                                model: 'properties',
                                key: 'id',
                            },

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'inventory_dates',
                      'room_typeId',
                      {
                          type: Sequelize.DataTypes.UUID,

                            references: {
                                model: 'room_types',
                                key: 'id',
                            },

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'inventory_dates',
                      'date',
                      {
                          type: Sequelize.DataTypes.DATE,

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'inventory_dates',
                      'alloted_beds',
                      {
                          type: Sequelize.DataTypes.INTEGER,

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'inventory_dates',
                      'closed_for_arrival',
                      {
                          type: Sequelize.DataTypes.BOOLEAN,

                            defaultValue: false,
                            allowNull: false,

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'inventory_dates',
                      'closed_for_departure',
                      {
                          type: Sequelize.DataTypes.BOOLEAN,

                            defaultValue: false,
                            allowNull: false,

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'inventory_dates',
                      'override_price',
                      {
                          type: Sequelize.DataTypes.DECIMAL,

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'maintenance_tickets',
                      'propertyId',
                      {
                          type: Sequelize.DataTypes.UUID,

                            references: {
                                model: 'properties',
                                key: 'id',
                            },

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'maintenance_tickets',
                      'roomId',
                      {
                          type: Sequelize.DataTypes.UUID,

                            references: {
                                model: 'rooms',
                                key: 'id',
                            },

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'maintenance_tickets',
                      'bedId',
                      {
                          type: Sequelize.DataTypes.UUID,

                            references: {
                                model: 'beds',
                                key: 'id',
                            },

                      },
                      { transaction }
                    );

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

                            values: ['low','medium','high','urgent'],

                      },
                      { transaction }
                    );

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

                            values: ['open','in_progress','resolved'],

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'maintenance_tickets',
                      'title',
                      {
                          type: Sequelize.DataTypes.TEXT,

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'maintenance_tickets',
                      'description',
                      {
                          type: Sequelize.DataTypes.TEXT,

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'maintenance_tickets',
                      'photos_json',
                      {
                          type: Sequelize.DataTypes.TEXT,

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'maintenance_tickets',
                      'created_by_userId',
                      {
                          type: Sequelize.DataTypes.UUID,

                            references: {
                                model: 'users',
                                key: 'id',
                            },

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'message_threads',
                      'propertyId',
                      {
                          type: Sequelize.DataTypes.UUID,

                            references: {
                                model: 'properties',
                                key: 'id',
                            },

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'message_threads',
                      'bookingId',
                      {
                          type: Sequelize.DataTypes.UUID,

                            references: {
                                model: 'bookings',
                                key: 'id',
                            },

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'message_threads',
                      'user_guestId',
                      {
                          type: Sequelize.DataTypes.UUID,

                            references: {
                                model: 'users',
                                key: 'id',
                            },

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'message_threads',
                      'subject',
                      {
                          type: Sequelize.DataTypes.TEXT,

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'messages',
                      'threadId',
                      {
                          type: Sequelize.DataTypes.UUID,

                            references: {
                                model: 'message_threads',
                                key: 'id',
                            },

                      },
                      { transaction }
                    );

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

                            values: ['guest','staff','system'],

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'messages',
                      'body',
                      {
                          type: Sequelize.DataTypes.TEXT,

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'messages',
                      'attachments_json',
                      {
                          type: Sequelize.DataTypes.TEXT,

                      },
                      { transaction }
                    );

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

                            references: {
                                model: 'bookings',
                                key: 'id',
                            },

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'payments',
                      'stripe_payment_intent_id',
                      {
                          type: Sequelize.DataTypes.TEXT,

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'payments',
                      'amount',
                      {
                          type: Sequelize.DataTypes.DECIMAL,

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'payments',
                      'currency',
                      {
                          type: Sequelize.DataTypes.TEXT,

                      },
                      { transaction }
                    );

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

                            values: ['pending','completed','failed'],

                      },
                      { transaction }
                    );

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

                            references: {
                                model: 'properties',
                                key: 'id',
                            },

                      },
                      { transaction }
                    );

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

                            references: {
                                model: 'bookings',
                                key: 'id',
                            },

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'reviews',
                      'rating',
                      {
                          type: Sequelize.DataTypes.INTEGER,

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'reviews',
                      'title',
                      {
                          type: Sequelize.DataTypes.TEXT,

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'reviews',
                      'body',
                      {
                          type: Sequelize.DataTypes.TEXT,

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'reviews',
                      'is_public',
                      {
                          type: Sequelize.DataTypes.BOOLEAN,

                            defaultValue: false,
                            allowNull: false,

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'room_types',
                      'propertyId',
                      {
                          type: Sequelize.DataTypes.UUID,

                            references: {
                                model: 'properties',
                                key: 'id',
                            },

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'room_types',
                      'name',
                      {
                          type: Sequelize.DataTypes.TEXT,

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'room_types',
                      'description',
                      {
                          type: Sequelize.DataTypes.TEXT,

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'room_types',
                      'capacity',
                      {
                          type: Sequelize.DataTypes.INTEGER,

                      },
                      { transaction }
                    );

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

                            values: ['mixed','female','male'],

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'room_types',
                      'amenities_json',
                      {
                          type: Sequelize.DataTypes.TEXT,

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'room_types',
                      'base_price',
                      {
                          type: Sequelize.DataTypes.DECIMAL,

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'room_types',
                      'is_private',
                      {
                          type: Sequelize.DataTypes.BOOLEAN,

                            defaultValue: false,
                            allowNull: false,

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'rooms',
                      'propertyId',
                      {
                          type: Sequelize.DataTypes.UUID,

                            references: {
                                model: 'properties',
                                key: 'id',
                            },

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'rooms',
                      'room_typeId',
                      {
                          type: Sequelize.DataTypes.UUID,

                            references: {
                                model: 'room_types',
                                key: 'id',
                            },

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'rooms',
                      'name',
                      {
                          type: Sequelize.DataTypes.TEXT,

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'rooms',
                      'floor',
                      {
                          type: Sequelize.DataTypes.INTEGER,

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'rooms',
                      'notes',
                      {
                          type: Sequelize.DataTypes.TEXT,

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'upsells',
                      'propertyId',
                      {
                          type: Sequelize.DataTypes.UUID,

                            references: {
                                model: 'properties',
                                key: 'id',
                            },

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'upsells',
                      'name',
                      {
                          type: Sequelize.DataTypes.TEXT,

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'upsells',
                      'description',
                      {
                          type: Sequelize.DataTypes.TEXT,

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'upsells',
                      'price',
                      {
                          type: Sequelize.DataTypes.DECIMAL,

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'upsells',
                      'currency',
                      {
                          type: Sequelize.DataTypes.TEXT,

                      },
                      { transaction }
                    );

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

                            defaultValue: false,
                            allowNull: false,

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'upsells',
                      'requires_date_time',
                      {
                          type: Sequelize.DataTypes.BOOLEAN,

                            defaultValue: false,
                            allowNull: false,

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'upsells',
                      'stock',
                      {
                          type: Sequelize.DataTypes.INTEGER,

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'upsells',
                      'is_active',
                      {
                          type: Sequelize.DataTypes.BOOLEAN,

                            defaultValue: false,
                            allowNull: false,

                      },
                      { transaction }
                    );

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

                            references: {
                                model: 'users',
                                key: 'id',
                            },

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'user_roles',
                      'propertyId',
                      {
                          type: Sequelize.DataTypes.UUID,

                            references: {
                                model: 'properties',
                                key: 'id',
                            },

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'user_roles',
                      'roleId',
                      {
                          type: Sequelize.DataTypes.UUID,

                            references: {
                                model: 'roles',
                                key: 'id',
                            },

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'permissions',
                      'name',
                      {
                          type: Sequelize.DataTypes.TEXT,

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'roles',
                      'name',
                      {
                          type: Sequelize.DataTypes.TEXT,

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'roles',
                      'role_customization',
                      {
                          type: Sequelize.DataTypes.TEXT,

                      },
                      { transaction }
                    );

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

                            references: {
                                model: 'roles',
                                key: 'id',
                            },

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'properties',
                      'name',
                      {
                          type: Sequelize.DataTypes.TEXT,

                      },
                      { transaction }
                    );

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

                            defaultValue: false,
                            allowNull: false,

                      },
                      { transaction }
                    );

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

                            references: {
                                model: 'properties',
                                key: 'id',
                            },

                      },
                      { transaction }
                    );

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

                            references: {
                                model: 'properties',
                                key: 'id',
                            },

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'beds',
                      'propertiesId',
                      {
                          type: Sequelize.DataTypes.UUID,

                            references: {
                                model: 'properties',
                                key: 'id',
                            },

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'booking_beds',
                      'propertiesId',
                      {
                          type: Sequelize.DataTypes.UUID,

                            references: {
                                model: 'properties',
                                key: 'id',
                            },

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'booking_upsells',
                      'propertiesId',
                      {
                          type: Sequelize.DataTypes.UUID,

                            references: {
                                model: 'properties',
                                key: 'id',
                            },

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'bookings',
                      'propertiesId',
                      {
                          type: Sequelize.DataTypes.UUID,

                            references: {
                                model: 'properties',
                                key: 'id',
                            },

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'coupons',
                      'propertiesId',
                      {
                          type: Sequelize.DataTypes.UUID,

                            references: {
                                model: 'properties',
                                key: 'id',
                            },

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'event_orders',
                      'propertiesId',
                      {
                          type: Sequelize.DataTypes.UUID,

                            references: {
                                model: 'properties',
                                key: 'id',
                            },

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'event_ticket_types',
                      'propertiesId',
                      {
                          type: Sequelize.DataTypes.UUID,

                            references: {
                                model: 'properties',
                                key: 'id',
                            },

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'event_tickets',
                      'propertiesId',
                      {
                          type: Sequelize.DataTypes.UUID,

                            references: {
                                model: 'properties',
                                key: 'id',
                            },

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'events',
                      'propertiesId',
                      {
                          type: Sequelize.DataTypes.UUID,

                            references: {
                                model: 'properties',
                                key: 'id',
                            },

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'housekeeping_tasks',
                      'propertiesId',
                      {
                          type: Sequelize.DataTypes.UUID,

                            references: {
                                model: 'properties',
                                key: 'id',
                            },

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'inventory_dates',
                      'propertiesId',
                      {
                          type: Sequelize.DataTypes.UUID,

                            references: {
                                model: 'properties',
                                key: 'id',
                            },

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'maintenance_tickets',
                      'propertiesId',
                      {
                          type: Sequelize.DataTypes.UUID,

                            references: {
                                model: 'properties',
                                key: 'id',
                            },

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'message_threads',
                      'propertiesId',
                      {
                          type: Sequelize.DataTypes.UUID,

                            references: {
                                model: 'properties',
                                key: 'id',
                            },

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'messages',
                      'propertiesId',
                      {
                          type: Sequelize.DataTypes.UUID,

                            references: {
                                model: 'properties',
                                key: 'id',
                            },

                      },
                      { transaction }
                    );

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

                            references: {
                                model: 'properties',
                                key: 'id',
                            },

                      },
                      { transaction }
                    );

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

                            references: {
                                model: 'properties',
                                key: 'id',
                            },

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'room_types',
                      'propertiesId',
                      {
                          type: Sequelize.DataTypes.UUID,

                            references: {
                                model: 'properties',
                                key: 'id',
                            },

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'rooms',
                      'propertiesId',
                      {
                          type: Sequelize.DataTypes.UUID,

                            references: {
                                model: 'properties',
                                key: 'id',
                            },

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'upsells',
                      'propertiesId',
                      {
                          type: Sequelize.DataTypes.UUID,

                            references: {
                                model: 'properties',
                                key: 'id',
                            },

                      },
                      { transaction }
                    );

                    await queryInterface.addColumn(
                      'user_roles',
                      'propertiesId',
                      {
                          type: Sequelize.DataTypes.UUID,

                            references: {
                                model: 'properties',
                                key: 'id',
                            },

                      },
                      { transaction }
                    );

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

                    await queryInterface.removeColumn(
                        'user_roles',
                        'propertiesId',
                        { transaction }
                    );

                    await queryInterface.removeColumn(
                        'upsells',
                        'propertiesId',
                        { transaction }
                    );

                    await queryInterface.removeColumn(
                        'rooms',
                        'propertiesId',
                        { transaction }
                    );

                    await queryInterface.removeColumn(
                        'room_types',
                        'propertiesId',
                        { transaction }
                    );

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

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

                    await queryInterface.removeColumn(
                        'messages',
                        'propertiesId',
                        { transaction }
                    );

                    await queryInterface.removeColumn(
                        'message_threads',
                        'propertiesId',
                        { transaction }
                    );

                    await queryInterface.removeColumn(
                        'maintenance_tickets',
                        'propertiesId',
                        { transaction }
                    );

                    await queryInterface.removeColumn(
                        'inventory_dates',
                        'propertiesId',
                        { transaction }
                    );

                    await queryInterface.removeColumn(
                        'housekeeping_tasks',
                        'propertiesId',
                        { transaction }
                    );

                    await queryInterface.removeColumn(
                        'events',
                        'propertiesId',
                        { transaction }
                    );

                    await queryInterface.removeColumn(
                        'event_tickets',
                        'propertiesId',
                        { transaction }
                    );

                    await queryInterface.removeColumn(
                        'event_ticket_types',
                        'propertiesId',
                        { transaction }
                    );

                    await queryInterface.removeColumn(
                        'event_orders',
                        'propertiesId',
                        { transaction }
                    );

                    await queryInterface.removeColumn(
                        'coupons',
                        'propertiesId',
                        { transaction }
                    );

                    await queryInterface.removeColumn(
                        'bookings',
                        'propertiesId',
                        { transaction }
                    );

                    await queryInterface.removeColumn(
                        'booking_upsells',
                        'propertiesId',
                        { transaction }
                    );

                    await queryInterface.removeColumn(
                        'booking_beds',
                        'propertiesId',
                        { transaction }
                    );

                    await queryInterface.removeColumn(
                        'beds',
                        'propertiesId',
                        { transaction }
                    );

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

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

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

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

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

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

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

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

                    await queryInterface.removeColumn(
                        'user_roles',
                        'roleId',
                        { transaction }
                    );

                    await queryInterface.removeColumn(
                        'user_roles',
                        'propertyId',
                        { transaction }
                    );

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

                    await queryInterface.removeColumn(
                        'upsells',
                        'is_active',
                        { transaction }
                    );

                    await queryInterface.removeColumn(
                        'upsells',
                        'stock',
                        { transaction }
                    );

                    await queryInterface.removeColumn(
                        'upsells',
                        'requires_date_time',
                        { transaction }
                    );

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

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

                    await queryInterface.removeColumn(
                        'upsells',
                        'price',
                        { transaction }
                    );

                    await queryInterface.removeColumn(
                        'upsells',
                        'description',
                        { transaction }
                    );

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

                    await queryInterface.removeColumn(
                        'upsells',
                        'propertyId',
                        { transaction }
                    );

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

                    await queryInterface.removeColumn(
                        'rooms',
                        'floor',
                        { transaction }
                    );

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

                    await queryInterface.removeColumn(
                        'rooms',
                        'room_typeId',
                        { transaction }
                    );

                    await queryInterface.removeColumn(
                        'rooms',
                        'propertyId',
                        { transaction }
                    );

                    await queryInterface.removeColumn(
                        'room_types',
                        'is_private',
                        { transaction }
                    );

                    await queryInterface.removeColumn(
                        'room_types',
                        'base_price',
                        { transaction }
                    );

                    await queryInterface.removeColumn(
                        'room_types',
                        'amenities_json',
                        { transaction }
                    );

                    await queryInterface.removeColumn(
                        'room_types',
                        'gender_policy',
                        { transaction }
                    );

                    await queryInterface.removeColumn(
                        'room_types',
                        'capacity',
                        { transaction }
                    );

                    await queryInterface.removeColumn(
                        'room_types',
                        'description',
                        { transaction }
                    );

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

                    await queryInterface.removeColumn(
                        'room_types',
                        'propertyId',
                        { transaction }
                    );

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

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

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

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

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

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

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

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

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

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

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

                    await queryInterface.removeColumn(
                        'messages',
                        'attachments_json',
                        { transaction }
                    );

                    await queryInterface.removeColumn(
                        'messages',
                        'body',
                        { transaction }
                    );

                    await queryInterface.removeColumn(
                        'messages',
                        'sender_type',
                        { transaction }
                    );

                    await queryInterface.removeColumn(
                        'messages',
                        'threadId',
                        { transaction }
                    );

                    await queryInterface.removeColumn(
                        'message_threads',
                        'subject',
                        { transaction }
                    );

                    await queryInterface.removeColumn(
                        'message_threads',
                        'user_guestId',
                        { transaction }
                    );

                    await queryInterface.removeColumn(
                        'message_threads',
                        'bookingId',
                        { transaction }
                    );

                    await queryInterface.removeColumn(
                        'message_threads',
                        'propertyId',
                        { transaction }
                    );

                    await queryInterface.removeColumn(
                        'maintenance_tickets',
                        'created_by_userId',
                        { transaction }
                    );

                    await queryInterface.removeColumn(
                        'maintenance_tickets',
                        'photos_json',
                        { transaction }
                    );

                    await queryInterface.removeColumn(
                        'maintenance_tickets',
                        'description',
                        { transaction }
                    );

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

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

                    await queryInterface.removeColumn(
                        'maintenance_tickets',
                        'priority',
                        { transaction }
                    );

                    await queryInterface.removeColumn(
                        'maintenance_tickets',
                        'bedId',
                        { transaction }
                    );

                    await queryInterface.removeColumn(
                        'maintenance_tickets',
                        'roomId',
                        { transaction }
                    );

                    await queryInterface.removeColumn(
                        'maintenance_tickets',
                        'propertyId',
                        { transaction }
                    );

                    await queryInterface.removeColumn(
                        'inventory_dates',
                        'override_price',
                        { transaction }
                    );

                    await queryInterface.removeColumn(
                        'inventory_dates',
                        'closed_for_departure',
                        { transaction }
                    );

                    await queryInterface.removeColumn(
                        'inventory_dates',
                        'closed_for_arrival',
                        { transaction }
                    );

                    await queryInterface.removeColumn(
                        'inventory_dates',
                        'alloted_beds',
                        { transaction }
                    );

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

                    await queryInterface.removeColumn(
                        'inventory_dates',
                        'room_typeId',
                        { transaction }
                    );

                    await queryInterface.removeColumn(
                        'inventory_dates',
                        'propertyId',
                        { transaction }
                    );

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

                    await queryInterface.removeColumn(
                        'housekeeping_tasks',
                        'assignee_userId',
                        { transaction }
                    );

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

                    await queryInterface.removeColumn(
                        'housekeeping_tasks',
                        'task_type',
                        { transaction }
                    );

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

                    await queryInterface.removeColumn(
                        'housekeeping_tasks',
                        'roomId',
                        { transaction }
                    );

                    await queryInterface.removeColumn(
                        'housekeeping_tasks',
                        'propertyId',
                        { transaction }
                    );

                    await queryInterface.removeColumn(
                        'events',
                        'is_active',
                        { transaction }
                    );

                    await queryInterface.removeColumn(
                        'events',
                        'capacity',
                        { transaction }
                    );

                    await queryInterface.removeColumn(
                        'events',
                        'end_at',
                        { transaction }
                    );

                    await queryInterface.removeColumn(
                        'events',
                        'start_at',
                        { transaction }
                    );

                    await queryInterface.removeColumn(
                        'events',
                        'description',
                        { transaction }
                    );

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

                    await queryInterface.removeColumn(
                        'events',
                        'propertyId',
                        { transaction }
                    );

                    await queryInterface.removeColumn(
                        'event_tickets',
                        'issued_to_email',
                        { transaction }
                    );

                    await queryInterface.removeColumn(
                        'event_tickets',
                        'issued_to_name',
                        { transaction }
                    );

                    await queryInterface.removeColumn(
                        'event_tickets',
                        'qr_svg',
                        { transaction }
                    );

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

                    await queryInterface.removeColumn(
                        'event_tickets',
                        'code',
                        { transaction }
                    );

                    await queryInterface.removeColumn(
                        'event_tickets',
                        'ticket_typeId',
                        { transaction }
                    );

                    await queryInterface.removeColumn(
                        'event_tickets',
                        'event_orderId',
                        { transaction }
                    );

                    await queryInterface.removeColumn(
                        'event_ticket_types',
                        'capacity_overrides',
                        { transaction }
                    );

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

                    await queryInterface.removeColumn(
                        'event_ticket_types',
                        'price',
                        { transaction }
                    );

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

                    await queryInterface.removeColumn(
                        'event_ticket_types',
                        'eventId',
                        { transaction }
                    );

                    await queryInterface.removeColumn(
                        'event_orders',
                        'stripe_payment_intent_id',
                        { transaction }
                    );

                    await queryInterface.removeColumn(
                        'event_orders',
                        'payment_status',
                        { transaction }
                    );

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

                    await queryInterface.removeColumn(
                        'event_orders',
                        'total_amount',
                        { transaction }
                    );

                    await queryInterface.removeColumn(
                        'event_orders',
                        'bookingId',
                        { transaction }
                    );

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

                    await queryInterface.removeColumn(
                        'event_orders',
                        'propertyId',
                        { transaction }
                    );

                    await queryInterface.removeColumn(
                        'coupons',
                        'times_redeemed',
                        { transaction }
                    );

                    await queryInterface.removeColumn(
                        'coupons',
                        'max_redemptions',
                        { transaction }
                    );

                    await queryInterface.removeColumn(
                        'coupons',
                        'ends_at',
                        { transaction }
                    );

                    await queryInterface.removeColumn(
                        'coupons',
                        'starts_at',
                        { transaction }
                    );

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

                    await queryInterface.removeColumn(
                        'coupons',
                        'value',
                        { transaction }
                    );

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

                    await queryInterface.removeColumn(
                        'coupons',
                        'code',
                        { transaction }
                    );

                    await queryInterface.removeColumn(
                        'coupons',
                        'propertyId',
                        { transaction }
                    );

                    await queryInterface.removeColumn(
                        'bookings',
                        'stripe_payment_intent_id',
                        { transaction }
                    );

                    await queryInterface.removeColumn(
                        'bookings',
                        'payment_status',
                        { transaction }
                    );

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

                    await queryInterface.removeColumn(
                        'bookings',
                        'total_amount',
                        { transaction }
                    );

                    await queryInterface.removeColumn(
                        'bookings',
                        'guests_count',
                        { transaction }
                    );

                    await queryInterface.removeColumn(
                        'bookings',
                        'checkout_date',
                        { transaction }
                    );

                    await queryInterface.removeColumn(
                        'bookings',
                        'checkin_date',
                        { transaction }
                    );

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

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

                    await queryInterface.removeColumn(
                        'bookings',
                        'code',
                        { transaction }
                    );

                    await queryInterface.removeColumn(
                        'bookings',
                        'propertyId',
                        { transaction }
                    );

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

                    await queryInterface.removeColumn(
                        'booking_upsells',
                        'scheduled_for',
                        { transaction }
                    );

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

                    await queryInterface.removeColumn(
                        'booking_upsells',
                        'unit_price',
                        { transaction }
                    );

                    await queryInterface.removeColumn(
                        'booking_upsells',
                        'quantity',
                        { transaction }
                    );

                    await queryInterface.removeColumn(
                        'booking_upsells',
                        'upsellId',
                        { transaction }
                    );

                    await queryInterface.removeColumn(
                        'booking_upsells',
                        'bookingId',
                        { transaction }
                    );

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

                    await queryInterface.removeColumn(
                        'booking_beds',
                        'room_typeId',
                        { transaction }
                    );

                    await queryInterface.removeColumn(
                        'booking_beds',
                        'bedId',
                        { transaction }
                    );

                    await queryInterface.removeColumn(
                        'booking_beds',
                        'bookingId',
                        { transaction }
                    );

                    await queryInterface.removeColumn(
                        'beds',
                        'is_active',
                        { transaction }
                    );

                    await queryInterface.removeColumn(
                        'beds',
                        'is_lower',
                        { transaction }
                    );

                    await queryInterface.removeColumn(
                        'beds',
                        'is_bunk',
                        { transaction }
                    );

                    await queryInterface.removeColumn(
                        'beds',
                        'code',
                        { transaction }
                    );

                    await queryInterface.removeColumn(
                        'beds',
                        'roomId',
                        { transaction }
                    );

                    await queryInterface.removeColumn(
                        'beds',
                        'propertyId',
                        { transaction }
                    );

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

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

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

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

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

                    await queryInterface.removeColumn(
                        'audit_logs',
                        'propertyId',
                        { 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('properties', { transaction });

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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