|
1 | 1 | import { MigrationInterface, QueryRunner } from "typeorm";
|
2 | 2 |
|
3 | 3 | export class MigrationName1743521461137 implements MigrationInterface {
|
4 |
| - public name = 'MigrationName1743521461137' |
| 4 | + public name = "MigrationName1743521461137"; |
5 | 5 |
|
6 |
| - public async up(queryRunner: QueryRunner): Promise<void> { |
7 |
| - await queryRunner.query(`CREATE INDEX "IDX_b2dd2b4597d3514ee4209ccd69" ON "Label" ("name") `); |
8 |
| - await queryRunner.query(`CREATE INDEX "IDX_2dfba2253270684804431fd3c8" ON "MetricType" ("name") `); |
9 |
| - } |
10 |
| - |
11 |
| - public async down(queryRunner: QueryRunner): Promise<void> { |
12 |
| - await queryRunner.query(`ALTER TABLE "OnCallDutyPolicyScheduleLayer" ALTER COLUMN "restrictionTimes" SET DEFAULT '{"_type": "RestrictionTimes", "value": {"restictionType": "None", "dayRestrictionTimes": null, "weeklyRestrictionTimes": []}}'`); |
13 |
| - await queryRunner.query(`ALTER TABLE "OnCallDutyPolicyScheduleLayer" ALTER COLUMN "rotation" SET DEFAULT '{"_type": "Recurring", "value": {"intervalType": "Day", "intervalCount": {"_type": "PositiveNumber", "value": 1}}}'`); |
14 |
| - } |
| 6 | + public async up(queryRunner: QueryRunner): Promise<void> { |
| 7 | + await queryRunner.query( |
| 8 | + `CREATE INDEX "IDX_b2dd2b4597d3514ee4209ccd69" ON "Label" ("name") `, |
| 9 | + ); |
| 10 | + await queryRunner.query( |
| 11 | + `CREATE INDEX "IDX_2dfba2253270684804431fd3c8" ON "MetricType" ("name") `, |
| 12 | + ); |
| 13 | + } |
15 | 14 |
|
| 15 | + public async down(queryRunner: QueryRunner): Promise<void> { |
| 16 | + await queryRunner.query( |
| 17 | + `ALTER TABLE "OnCallDutyPolicyScheduleLayer" ALTER COLUMN "restrictionTimes" SET DEFAULT '{"_type": "RestrictionTimes", "value": {"restictionType": "None", "dayRestrictionTimes": null, "weeklyRestrictionTimes": []}}'`, |
| 18 | + ); |
| 19 | + await queryRunner.query( |
| 20 | + `ALTER TABLE "OnCallDutyPolicyScheduleLayer" ALTER COLUMN "rotation" SET DEFAULT '{"_type": "Recurring", "value": {"intervalType": "Day", "intervalCount": {"_type": "PositiveNumber", "value": 1}}}'`, |
| 21 | + ); |
| 22 | + } |
16 | 23 | }
|
0 commit comments