@oneuptime/common 7.0.4763 → 7.0.4766
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Server/Infrastructure/Postgres/SchemaMigrations/1753383711511-MigrationName.ts +113 -42
- package/Server/Infrastructure/Postgres/SchemaMigrations/Index.ts +1 -1
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1753383711511-MigrationName.js +1 -1
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1753383711511-MigrationName.js.map +1 -1
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js +1 -1
- package/package.json +1 -1
|
@@ -1,48 +1,119 @@
|
|
|
1
1
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
|
2
2
|
|
|
3
3
|
export class MigrationName1753383711511 implements MigrationInterface {
|
|
4
|
-
|
|
4
|
+
public name = "MigrationName1753383711511";
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
6
|
+
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
7
|
+
await queryRunner.query(
|
|
8
|
+
`ALTER TABLE "OnCallDutyPolicyScheduleLayer" ALTER COLUMN "rotation" SET DEFAULT '{"_type":"Recurring","value":{"intervalType":"Day","intervalCount":{"_type":"PositiveNumber","value":1}}}'`,
|
|
9
|
+
);
|
|
10
|
+
await queryRunner.query(
|
|
11
|
+
`ALTER TABLE "OnCallDutyPolicyScheduleLayer" ALTER COLUMN "restrictionTimes" SET DEFAULT '{"_type":"RestrictionTimes","value":{"restictionType":"None","dayRestrictionTimes":null,"weeklyRestrictionTimes":[]}}'`,
|
|
12
|
+
);
|
|
13
|
+
await queryRunner.query(
|
|
14
|
+
`CREATE INDEX "IDX_b03e14b5a5fc9f5b8603283c88" ON "OnCallDutyPolicyExecutionLogTimeline" ("alertSentToUserId", "projectId") `,
|
|
15
|
+
);
|
|
16
|
+
await queryRunner.query(
|
|
17
|
+
`CREATE INDEX "IDX_114e3f761691867aa919ab6b6e" ON "OnCallDutyPolicyExecutionLogTimeline" ("projectId", "createdAt") `,
|
|
18
|
+
);
|
|
19
|
+
await queryRunner.query(
|
|
20
|
+
`CREATE INDEX "IDX_f34e1244e487f705e7c6b25831" ON "OnCallDutyPolicyExecutionLogTimeline" ("onCallDutyPolicyExecutionLogId", "createdAt") `,
|
|
21
|
+
);
|
|
22
|
+
await queryRunner.query(
|
|
23
|
+
`CREATE INDEX "IDX_34f21c8ae164fb90be806818a8" ON "OnCallDutyPolicyOwnerTeam" ("onCallDutyPolicyId", "teamId", "projectId") `,
|
|
24
|
+
);
|
|
25
|
+
await queryRunner.query(
|
|
26
|
+
`CREATE INDEX "IDX_1539db4bbd6ada58abb940b058" ON "OnCallDutyPolicyOwnerUser" ("onCallDutyPolicyId", "userId", "projectId") `,
|
|
27
|
+
);
|
|
28
|
+
await queryRunner.query(
|
|
29
|
+
`CREATE INDEX "IDX_00439dd14338c3ee4e81d0714a" ON "ScheduledMaintenanceState" ("projectId", "isEndedState") `,
|
|
30
|
+
);
|
|
31
|
+
await queryRunner.query(
|
|
32
|
+
`CREATE INDEX "IDX_7addde4d27f13be56651000df9" ON "ScheduledMaintenanceState" ("projectId", "isOngoingState") `,
|
|
33
|
+
);
|
|
34
|
+
await queryRunner.query(
|
|
35
|
+
`CREATE INDEX "IDX_e84431ba010571147933477cff" ON "ScheduledMaintenanceState" ("projectId", "order") `,
|
|
36
|
+
);
|
|
37
|
+
await queryRunner.query(
|
|
38
|
+
`CREATE INDEX "IDX_b737666365dbea2e4c914fc6d3" ON "ScheduledMaintenanceOwnerTeam" ("scheduledMaintenanceId", "teamId", "projectId") `,
|
|
39
|
+
);
|
|
40
|
+
await queryRunner.query(
|
|
41
|
+
`CREATE INDEX "IDX_a4621b7155a01292b92569549f" ON "ScheduledMaintenanceOwnerUser" ("scheduledMaintenanceId", "userId", "projectId") `,
|
|
42
|
+
);
|
|
43
|
+
await queryRunner.query(
|
|
44
|
+
`CREATE INDEX "IDX_c4ac940ddb05242a166567edbb" ON "ScheduledMaintenanceStateTimeline" ("scheduledMaintenanceId", "startsAt") `,
|
|
45
|
+
);
|
|
46
|
+
await queryRunner.query(
|
|
47
|
+
`CREATE INDEX "IDX_4873976169085f14bdc39e168d" ON "StatusPageOwnerTeam" ("statusPageId", "teamId", "projectId") `,
|
|
48
|
+
);
|
|
49
|
+
await queryRunner.query(
|
|
50
|
+
`CREATE INDEX "IDX_a9f80dc4f648f0957ce695dc61" ON "StatusPageOwnerUser" ("statusPageId", "userId", "projectId") `,
|
|
51
|
+
);
|
|
52
|
+
await queryRunner.query(
|
|
53
|
+
`CREATE INDEX "IDX_33ba145fe2826bb953e2ce9d3d" ON "UserOnCallLogTimeline" ("projectId", "status") `,
|
|
54
|
+
);
|
|
55
|
+
await queryRunner.query(
|
|
56
|
+
`CREATE INDEX "IDX_90363cc35c22e377df8fdc5dfb" ON "UserOnCallLogTimeline" ("onCallDutyPolicyExecutionLogId", "status") `,
|
|
57
|
+
);
|
|
58
|
+
await queryRunner.query(
|
|
59
|
+
`CREATE INDEX "IDX_89cccd6782b1ee84d20e9690d0" ON "UserOnCallLogTimeline" ("userId", "createdAt") `,
|
|
60
|
+
);
|
|
61
|
+
}
|
|
47
62
|
|
|
63
|
+
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
64
|
+
await queryRunner.query(
|
|
65
|
+
`DROP INDEX "public"."IDX_89cccd6782b1ee84d20e9690d0"`,
|
|
66
|
+
);
|
|
67
|
+
await queryRunner.query(
|
|
68
|
+
`DROP INDEX "public"."IDX_90363cc35c22e377df8fdc5dfb"`,
|
|
69
|
+
);
|
|
70
|
+
await queryRunner.query(
|
|
71
|
+
`DROP INDEX "public"."IDX_33ba145fe2826bb953e2ce9d3d"`,
|
|
72
|
+
);
|
|
73
|
+
await queryRunner.query(
|
|
74
|
+
`DROP INDEX "public"."IDX_a9f80dc4f648f0957ce695dc61"`,
|
|
75
|
+
);
|
|
76
|
+
await queryRunner.query(
|
|
77
|
+
`DROP INDEX "public"."IDX_4873976169085f14bdc39e168d"`,
|
|
78
|
+
);
|
|
79
|
+
await queryRunner.query(
|
|
80
|
+
`DROP INDEX "public"."IDX_c4ac940ddb05242a166567edbb"`,
|
|
81
|
+
);
|
|
82
|
+
await queryRunner.query(
|
|
83
|
+
`DROP INDEX "public"."IDX_a4621b7155a01292b92569549f"`,
|
|
84
|
+
);
|
|
85
|
+
await queryRunner.query(
|
|
86
|
+
`DROP INDEX "public"."IDX_b737666365dbea2e4c914fc6d3"`,
|
|
87
|
+
);
|
|
88
|
+
await queryRunner.query(
|
|
89
|
+
`DROP INDEX "public"."IDX_e84431ba010571147933477cff"`,
|
|
90
|
+
);
|
|
91
|
+
await queryRunner.query(
|
|
92
|
+
`DROP INDEX "public"."IDX_7addde4d27f13be56651000df9"`,
|
|
93
|
+
);
|
|
94
|
+
await queryRunner.query(
|
|
95
|
+
`DROP INDEX "public"."IDX_00439dd14338c3ee4e81d0714a"`,
|
|
96
|
+
);
|
|
97
|
+
await queryRunner.query(
|
|
98
|
+
`DROP INDEX "public"."IDX_1539db4bbd6ada58abb940b058"`,
|
|
99
|
+
);
|
|
100
|
+
await queryRunner.query(
|
|
101
|
+
`DROP INDEX "public"."IDX_34f21c8ae164fb90be806818a8"`,
|
|
102
|
+
);
|
|
103
|
+
await queryRunner.query(
|
|
104
|
+
`DROP INDEX "public"."IDX_f34e1244e487f705e7c6b25831"`,
|
|
105
|
+
);
|
|
106
|
+
await queryRunner.query(
|
|
107
|
+
`DROP INDEX "public"."IDX_114e3f761691867aa919ab6b6e"`,
|
|
108
|
+
);
|
|
109
|
+
await queryRunner.query(
|
|
110
|
+
`DROP INDEX "public"."IDX_b03e14b5a5fc9f5b8603283c88"`,
|
|
111
|
+
);
|
|
112
|
+
await queryRunner.query(
|
|
113
|
+
`ALTER TABLE "OnCallDutyPolicyScheduleLayer" ALTER COLUMN "restrictionTimes" SET DEFAULT '{"_type": "RestrictionTimes", "value": {"restictionType": "None", "dayRestrictionTimes": null, "weeklyRestrictionTimes": []}}'`,
|
|
114
|
+
);
|
|
115
|
+
await queryRunner.query(
|
|
116
|
+
`ALTER TABLE "OnCallDutyPolicyScheduleLayer" ALTER COLUMN "rotation" SET DEFAULT '{"_type": "Recurring", "value": {"intervalType": "Day", "intervalCount": {"_type": "PositiveNumber", "value": 1}}}'`,
|
|
117
|
+
);
|
|
118
|
+
}
|
|
48
119
|
}
|
package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1753383711511-MigrationName.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export class MigrationName1753383711511 {
|
|
2
2
|
constructor() {
|
|
3
|
-
this.name =
|
|
3
|
+
this.name = "MigrationName1753383711511";
|
|
4
4
|
}
|
|
5
5
|
async up(queryRunner) {
|
|
6
6
|
await queryRunner.query(`ALTER TABLE "OnCallDutyPolicyScheduleLayer" ALTER COLUMN "rotation" SET DEFAULT '{"_type":"Recurring","value":{"intervalType":"Day","intervalCount":{"_type":"PositiveNumber","value":1}}}'`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"1753383711511-MigrationName.js","sourceRoot":"","sources":["../../../../../../Server/Infrastructure/Postgres/SchemaMigrations/1753383711511-MigrationName.ts"],"names":[],"mappings":"AAEA,MAAM,OAAO,0BAA0B;IAAvC;
|
|
1
|
+
{"version":3,"file":"1753383711511-MigrationName.js","sourceRoot":"","sources":["../../../../../../Server/Infrastructure/Postgres/SchemaMigrations/1753383711511-MigrationName.ts"],"names":[],"mappings":"AAEA,MAAM,OAAO,0BAA0B;IAAvC;QACS,SAAI,GAAG,4BAA4B,CAAC;IAmH7C,CAAC;IAjHQ,KAAK,CAAC,EAAE,CAAC,WAAwB;QACtC,MAAM,WAAW,CAAC,KAAK,CACrB,6LAA6L,CAC9L,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CACrB,iNAAiN,CAClN,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CACrB,6HAA6H,CAC9H,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CACrB,qHAAqH,CACtH,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CACrB,0IAA0I,CAC3I,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CACrB,6HAA6H,CAC9H,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CACrB,6HAA6H,CAC9H,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CACrB,6GAA6G,CAC9G,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CACrB,+GAA+G,CAChH,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CACrB,sGAAsG,CACvG,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CACrB,qIAAqI,CACtI,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CACrB,qIAAqI,CACtI,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CACrB,8HAA8H,CAC/H,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CACrB,iHAAiH,CAClH,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CACrB,iHAAiH,CAClH,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CACrB,mGAAmG,CACpG,CAAC;QACF,MAAM,WAAW,CAAC,KAAK,CACrB,wHAAwH,CACzH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