"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.RemoveRole1700697923669 = void 0;
class RemoveRole1700697923669 {
    constructor() {
        this.name = 'RemoveRole1700697923669';
    }
    async up(queryRunner) {
        await queryRunner.query(`ALTER TABLE \`user\` DROP FOREIGN KEY \`FK_c28e52f758e7bbc53828db92194\``);
        await queryRunner.query(`ALTER TABLE \`user\` CHANGE \`roleId\` \`role\` int NULL`);
        await queryRunner.query(`ALTER TABLE \`user\` DROP COLUMN \`role\``);
        await queryRunner.query(`ALTER TABLE \`user\` ADD \`role\` enum ('super_admin', 'admin', 'user') NOT NULL DEFAULT 'user'`);
    }
    async down(queryRunner) {
        await queryRunner.query(`ALTER TABLE \`user\` DROP COLUMN \`role\``);
        await queryRunner.query(`ALTER TABLE \`user\` ADD \`role\` int NULL`);
        await queryRunner.query(`ALTER TABLE \`user\` CHANGE \`role\` \`roleId\` int NULL`);
        await queryRunner.query(`ALTER TABLE \`user\` ADD CONSTRAINT \`FK_c28e52f758e7bbc53828db92194\` FOREIGN KEY (\`roleId\`) REFERENCES \`role\`(\`id\`) ON DELETE NO ACTION ON UPDATE NO ACTION`);
    }
}
exports.RemoveRole1700697923669 = RemoveRole1700697923669;
//# sourceMappingURL=1700697923669-remove-role.js.map