export class MigrationName1775735059360 {
    constructor() {
        this.name = "MigrationName1775735059360";
    }
    async up(queryRunner) {
        await queryRunner.query(`DROP INDEX "public"."IDX_SERVICE_PROJECT_NAME_UNIQUE"`);
        await queryRunner.query(`ALTER TABLE "OnCallDutyPolicyScheduleLayer" ALTER COLUMN "rotation" SET DEFAULT '{"_type":"Recurring","value":{"intervalType":"Day","intervalCount":{"_type":"PositiveNumber","value":1}}}'`);
        await queryRunner.query(`ALTER TABLE "OnCallDutyPolicyScheduleLayer" ALTER COLUMN "restrictionTimes" SET DEFAULT '{"_type":"RestrictionTimes","value":{"restictionType":"None","dayRestrictionTimes":null,"weeklyRestrictionTimes":[]}}'`);
        await queryRunner.query(`ALTER TABLE "Workflow" ALTER COLUMN "webhookSecretKey" TYPE character varying`);
    }
    async down(queryRunner) {
        await queryRunner.query(`ALTER TABLE "Workflow" ALTER COLUMN "webhookSecretKey" TYPE text`);
        await queryRunner.query(`ALTER TABLE "OnCallDutyPolicyScheduleLayer" ALTER COLUMN "restrictionTimes" SET DEFAULT '{"_type": "RestrictionTimes", "value": {"restictionType": "None", "dayRestrictionTimes": null, "weeklyRestrictionTimes": []}}'`);
        await queryRunner.query(`ALTER TABLE "OnCallDutyPolicyScheduleLayer" ALTER COLUMN "rotation" SET DEFAULT '{"_type": "Recurring", "value": {"intervalType": "Day", "intervalCount": {"_type": "PositiveNumber", "value": 1}}}'`);
        await queryRunner.query(`CREATE UNIQUE INDEX "IDX_SERVICE_PROJECT_NAME_UNIQUE" ON "Service" ("projectId") WHERE ("deletedAt" IS NULL)`);
    }
}
//# sourceMappingURL=1775735059360-MigrationName.js.map