import { MigrationInterface, QueryRunner } from "typeorm";

export class MigrationName1767979055522 implements MigrationInterface {
  public name = "MigrationName1767979055522";

  public async up(queryRunner: QueryRunner): Promise<void> {
    await queryRunner.query(
      `ALTER TABLE "Service" DROP CONSTRAINT "FK_e712ff4cf5c1a865a5baa242e2e"`,
    );
    await queryRunner.query(
      `ALTER TABLE "Service" DROP CONSTRAINT "FK_b8d64daaf462acd6f694ca47dad"`,
    );
    await queryRunner.query(
      `ALTER TABLE "Service" DROP CONSTRAINT "FK_42f81942e36f5f42a5dce8e606d"`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceOwnerTeam" DROP CONSTRAINT "FK_726241162b0a853b29d85e28c4c"`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceOwnerTeam" DROP CONSTRAINT "FK_e3090773a4106e0c4375897993f"`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceOwnerTeam" DROP CONSTRAINT "FK_c015513688ebd42e5569b4d6ac6"`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceOwnerTeam" DROP CONSTRAINT "FK_9afb156569266f66a2301eb09ff"`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceOwnerTeam" DROP CONSTRAINT "FK_0e93a638ddc94aaad4ad33789d7"`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceOwnerUser" DROP CONSTRAINT "FK_51c375fe9f6ffb0372d3425d999"`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceOwnerUser" DROP CONSTRAINT "FK_f6abd337058906d7912164ae12e"`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceOwnerUser" DROP CONSTRAINT "FK_27a396dd77fb8c0d5d6cb892165"`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceOwnerUser" DROP CONSTRAINT "FK_2d2c21db8da169b5b2d2bee3111"`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceOwnerUser" DROP CONSTRAINT "FK_d61607e823057b6516f05e8f1cd"`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceCodeRepository" DROP CONSTRAINT "FK_41a90624dfbb954e3b50c93dfc1"`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceCodeRepository" DROP CONSTRAINT "FK_4638e464dc7cab644c7926674b8"`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceCodeRepository" DROP CONSTRAINT "FK_05b6c65746b28329def0accba94"`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceCodeRepository" DROP CONSTRAINT "FK_c838ecb46958f5de7a699f50c53"`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceCodeRepository" DROP CONSTRAINT "FK_1aae6b3a023a36f7c004749afe4"`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceDependency" DROP CONSTRAINT "FK_5d213c12854b956ed3c7f5f82f5"`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceDependency" DROP CONSTRAINT "FK_bd2b648fe0cd2955d73286f3f90"`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceDependency" DROP CONSTRAINT "FK_84855f72c816f5fa05c76365810"`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceDependency" DROP CONSTRAINT "FK_3741c2e3d35cb739451e50fcac2"`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceDependency" DROP CONSTRAINT "FK_a4e505f3feab672e2dbbb3a58a1"`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceMonitor" DROP CONSTRAINT "FK_4ea52669c01c5ec8920d5d4b6da"`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceMonitor" DROP CONSTRAINT "FK_8becc4dbab47d9c6cbdcdcd4dc9"`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceMonitor" DROP CONSTRAINT "FK_b3cdff92c6b8c874e3406b2add5"`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceMonitor" DROP CONSTRAINT "FK_e8e03c07999471753b9f6093a67"`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceMonitor" DROP CONSTRAINT "FK_1783ec2972d9cbf2f91fced5be3"`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceTelemetryService" DROP CONSTRAINT "FK_8193db094ffae0498ed3425e36a"`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceTelemetryService" DROP CONSTRAINT "FK_d8010d867aee38375f92dcf5a02"`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceTelemetryService" DROP CONSTRAINT "FK_0e147801744032a9b33ee879829"`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceTelemetryService" DROP CONSTRAINT "FK_64a7908ff27c562a2d7f5532e2a"`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceTelemetryService" DROP CONSTRAINT "FK_b0419b3b36e6606a404eb97a98a"`,
    );
    await queryRunner.query(
      `ALTER TABLE "TelemetryServiceLabel" DROP CONSTRAINT "FK_94d495f938d819dab20480c5f80"`,
    );
    await queryRunner.query(
      `ALTER TABLE "TelemetryServiceLabel" DROP CONSTRAINT "FK_7711266422ebad1188c4879d669"`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceLabel" DROP CONSTRAINT "FK_98e9d83b6ff61003a29590f3987"`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceLabel" DROP CONSTRAINT "FK_701f84e45404bdddcffdcaaba20"`,
    );
    await queryRunner.query(
      `DROP INDEX "public"."IDX_e712ff4cf5c1a865a5baa242e2"`,
    );
    await queryRunner.query(
      `DROP INDEX "public"."IDX_726241162b0a853b29d85e28c4"`,
    );
    await queryRunner.query(
      `DROP INDEX "public"."IDX_e3090773a4106e0c4375897993"`,
    );
    await queryRunner.query(
      `DROP INDEX "public"."IDX_c015513688ebd42e5569b4d6ac"`,
    );
    await queryRunner.query(
      `DROP INDEX "public"."IDX_51c375fe9f6ffb0372d3425d99"`,
    );
    await queryRunner.query(
      `DROP INDEX "public"."IDX_f6abd337058906d7912164ae12"`,
    );
    await queryRunner.query(
      `DROP INDEX "public"."IDX_27a396dd77fb8c0d5d6cb89216"`,
    );
    await queryRunner.query(
      `DROP INDEX "public"."IDX_41a90624dfbb954e3b50c93dfc"`,
    );
    await queryRunner.query(
      `DROP INDEX "public"."IDX_4638e464dc7cab644c7926674b"`,
    );
    await queryRunner.query(
      `DROP INDEX "public"."IDX_05b6c65746b28329def0accba9"`,
    );
    await queryRunner.query(
      `DROP INDEX "public"."IDX_5d213c12854b956ed3c7f5f82f"`,
    );
    await queryRunner.query(
      `DROP INDEX "public"."IDX_bd2b648fe0cd2955d73286f3f9"`,
    );
    await queryRunner.query(
      `DROP INDEX "public"."IDX_84855f72c816f5fa05c7636581"`,
    );
    await queryRunner.query(
      `DROP INDEX "public"."IDX_4ea52669c01c5ec8920d5d4b6d"`,
    );
    await queryRunner.query(
      `DROP INDEX "public"."IDX_8becc4dbab47d9c6cbdcdcd4dc"`,
    );
    await queryRunner.query(
      `DROP INDEX "public"."IDX_b3cdff92c6b8c874e3406b2add"`,
    );
    await queryRunner.query(
      `DROP INDEX "public"."IDX_8193db094ffae0498ed3425e36"`,
    );
    await queryRunner.query(
      `DROP INDEX "public"."IDX_d8010d867aee38375f92dcf5a0"`,
    );
    await queryRunner.query(
      `DROP INDEX "public"."IDX_0e147801744032a9b33ee87982"`,
    );
    await queryRunner.query(
      `DROP INDEX "public"."IDX_94d495f938d819dab20480c5f8"`,
    );
    await queryRunner.query(
      `DROP INDEX "public"."IDX_7711266422ebad1188c4879d66"`,
    );
    await queryRunner.query(
      `DROP INDEX "public"."IDX_98e9d83b6ff61003a29590f398"`,
    );
    await queryRunner.query(
      `DROP INDEX "public"."IDX_701f84e45404bdddcffdcaaba2"`,
    );
    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(
      `CREATE INDEX "IDX_ff1320357cbe3d5a1dc7f1e268" ON "Service" ("projectId") `,
    );
    await queryRunner.query(
      `CREATE INDEX "IDX_f9ce25f74e41b13aa630f536eb" ON "ServiceOwnerTeam" ("projectId") `,
    );
    await queryRunner.query(
      `CREATE INDEX "IDX_592b88007d58c6a3710c42201a" ON "ServiceOwnerTeam" ("teamId") `,
    );
    await queryRunner.query(
      `CREATE INDEX "IDX_e9a1186a29ab1b4c23a3927470" ON "ServiceOwnerTeam" ("serviceId") `,
    );
    await queryRunner.query(
      `CREATE INDEX "IDX_b9c710b4ebbb1ef3617310756a" ON "ServiceOwnerUser" ("projectId") `,
    );
    await queryRunner.query(
      `CREATE INDEX "IDX_70f78ff146220713c5ddbfbc50" ON "ServiceOwnerUser" ("userId") `,
    );
    await queryRunner.query(
      `CREATE INDEX "IDX_961199ad1e45039ed116b7c642" ON "ServiceOwnerUser" ("serviceId") `,
    );
    await queryRunner.query(
      `CREATE INDEX "IDX_3497e882e1590e6f9abca00ac4" ON "ServiceCodeRepository" ("projectId") `,
    );
    await queryRunner.query(
      `CREATE INDEX "IDX_46327fbb53a5a2f04f1747716c" ON "ServiceCodeRepository" ("serviceId") `,
    );
    await queryRunner.query(
      `CREATE INDEX "IDX_0e2f7235264b77ac7214178da7" ON "ServiceCodeRepository" ("codeRepositoryId") `,
    );
    await queryRunner.query(
      `CREATE INDEX "IDX_3e2a1ef7e8795a46c2e2e9955c" ON "ServiceDependency" ("projectId") `,
    );
    await queryRunner.query(
      `CREATE INDEX "IDX_3af01e69f3e28ae56a968bbd81" ON "ServiceDependency" ("serviceId") `,
    );
    await queryRunner.query(
      `CREATE INDEX "IDX_c2562045902370ec46091924fc" ON "ServiceDependency" ("dependencyServiceId") `,
    );
    await queryRunner.query(
      `CREATE INDEX "IDX_f3afc9f2012eb60fd6c92427ad" ON "ServiceMonitor" ("projectId") `,
    );
    await queryRunner.query(
      `CREATE INDEX "IDX_dbbd6f4b17276c887a67016373" ON "ServiceMonitor" ("serviceId") `,
    );
    await queryRunner.query(
      `CREATE INDEX "IDX_c34cac2fa25193f64be3ef22ef" ON "ServiceMonitor" ("monitorId") `,
    );
    await queryRunner.query(
      `CREATE INDEX "IDX_27a8afc848b9f8aa39303622f6" ON "ServiceTelemetryService" ("projectId") `,
    );
    await queryRunner.query(
      `CREATE INDEX "IDX_0aed874674616c15b0c5a6551e" ON "ServiceTelemetryService" ("serviceId") `,
    );
    await queryRunner.query(
      `CREATE INDEX "IDX_7e94e4b22003ed6ee0409a68d3" ON "ServiceTelemetryService" ("telemetryServiceId") `,
    );
    await queryRunner.query(
      `CREATE INDEX "IDX_ebf708a8d435442c8cb229eb4a" ON "TelemetryServiceLabel" ("telemetryServiceId") `,
    );
    await queryRunner.query(
      `CREATE INDEX "IDX_a697535be0dc0dfbbbf6a671ee" ON "TelemetryServiceLabel" ("labelId") `,
    );
    await queryRunner.query(
      `CREATE INDEX "IDX_d6d8507cd94721f63f2ba6f7b2" ON "ServiceLabel" ("serviceId") `,
    );
    await queryRunner.query(
      `CREATE INDEX "IDX_7711266422ebad1188c4879d66" ON "ServiceLabel" ("labelId") `,
    );
    await queryRunner.query(
      `ALTER TABLE "Service" ADD CONSTRAINT "FK_ff1320357cbe3d5a1dc7f1e2688" FOREIGN KEY ("projectId") REFERENCES "Project"("_id") ON DELETE CASCADE ON UPDATE NO ACTION`,
    );
    await queryRunner.query(
      `ALTER TABLE "Service" ADD CONSTRAINT "FK_73d0dda0cfa1edb9ae4fa2edb65" FOREIGN KEY ("createdByUserId") REFERENCES "User"("_id") ON DELETE SET NULL ON UPDATE NO ACTION`,
    );
    await queryRunner.query(
      `ALTER TABLE "Service" ADD CONSTRAINT "FK_bb4eb18e4568cbeacc194c5c977" FOREIGN KEY ("deletedByUserId") REFERENCES "User"("_id") ON DELETE SET NULL ON UPDATE NO ACTION`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceOwnerTeam" ADD CONSTRAINT "FK_f9ce25f74e41b13aa630f536ebb" FOREIGN KEY ("projectId") REFERENCES "Project"("_id") ON DELETE CASCADE ON UPDATE NO ACTION`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceOwnerTeam" ADD CONSTRAINT "FK_592b88007d58c6a3710c42201a7" FOREIGN KEY ("teamId") REFERENCES "Team"("_id") ON DELETE CASCADE ON UPDATE NO ACTION`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceOwnerTeam" ADD CONSTRAINT "FK_e9a1186a29ab1b4c23a3927470e" FOREIGN KEY ("serviceId") REFERENCES "Service"("_id") ON DELETE CASCADE ON UPDATE NO ACTION`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceOwnerTeam" ADD CONSTRAINT "FK_50d71c373bb442613139ffb4776" FOREIGN KEY ("createdByUserId") REFERENCES "User"("_id") ON DELETE SET NULL ON UPDATE NO ACTION`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceOwnerTeam" ADD CONSTRAINT "FK_f7afc098ab50af09b5264b87ed3" FOREIGN KEY ("deletedByUserId") REFERENCES "User"("_id") ON DELETE SET NULL ON UPDATE NO ACTION`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceOwnerUser" ADD CONSTRAINT "FK_b9c710b4ebbb1ef3617310756a2" FOREIGN KEY ("projectId") REFERENCES "Project"("_id") ON DELETE CASCADE ON UPDATE NO ACTION`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceOwnerUser" ADD CONSTRAINT "FK_70f78ff146220713c5ddbfbc505" FOREIGN KEY ("userId") REFERENCES "User"("_id") ON DELETE CASCADE ON UPDATE NO ACTION`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceOwnerUser" ADD CONSTRAINT "FK_961199ad1e45039ed116b7c642f" FOREIGN KEY ("serviceId") REFERENCES "Service"("_id") ON DELETE CASCADE ON UPDATE NO ACTION`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceOwnerUser" ADD CONSTRAINT "FK_13458e8b37ec9b964cfebc46773" FOREIGN KEY ("createdByUserId") REFERENCES "User"("_id") ON DELETE SET NULL ON UPDATE NO ACTION`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceOwnerUser" ADD CONSTRAINT "FK_18d406f83326e42bda4873a58ac" FOREIGN KEY ("deletedByUserId") REFERENCES "User"("_id") ON DELETE SET NULL ON UPDATE NO ACTION`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceCodeRepository" ADD CONSTRAINT "FK_3497e882e1590e6f9abca00ac4b" FOREIGN KEY ("projectId") REFERENCES "Project"("_id") ON DELETE CASCADE ON UPDATE NO ACTION`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceCodeRepository" ADD CONSTRAINT "FK_46327fbb53a5a2f04f1747716ca" FOREIGN KEY ("serviceId") REFERENCES "Service"("_id") ON DELETE CASCADE ON UPDATE NO ACTION`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceCodeRepository" ADD CONSTRAINT "FK_0e2f7235264b77ac7214178da7b" FOREIGN KEY ("codeRepositoryId") REFERENCES "CodeRepository"("_id") ON DELETE CASCADE ON UPDATE NO ACTION`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceCodeRepository" ADD CONSTRAINT "FK_53b00f5184ca7031f625ac5ebf8" FOREIGN KEY ("createdByUserId") REFERENCES "User"("_id") ON DELETE SET NULL ON UPDATE NO ACTION`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceCodeRepository" ADD CONSTRAINT "FK_32f46905c9550cee537d0ee47be" FOREIGN KEY ("deletedByUserId") REFERENCES "User"("_id") ON DELETE SET NULL ON UPDATE NO ACTION`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceDependency" ADD CONSTRAINT "FK_3e2a1ef7e8795a46c2e2e9955c2" FOREIGN KEY ("projectId") REFERENCES "Project"("_id") ON DELETE CASCADE ON UPDATE NO ACTION`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceDependency" ADD CONSTRAINT "FK_3af01e69f3e28ae56a968bbd812" FOREIGN KEY ("serviceId") REFERENCES "Service"("_id") ON DELETE CASCADE ON UPDATE NO ACTION`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceDependency" ADD CONSTRAINT "FK_c2562045902370ec46091924fc8" FOREIGN KEY ("dependencyServiceId") REFERENCES "Service"("_id") ON DELETE CASCADE ON UPDATE NO ACTION`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceDependency" ADD CONSTRAINT "FK_cc8c8d41106bebab21d1c69e129" FOREIGN KEY ("createdByUserId") REFERENCES "User"("_id") ON DELETE SET NULL ON UPDATE NO ACTION`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceDependency" ADD CONSTRAINT "FK_feb830e4e4f8259a871105b16e8" FOREIGN KEY ("deletedByUserId") REFERENCES "User"("_id") ON DELETE SET NULL ON UPDATE NO ACTION`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceMonitor" ADD CONSTRAINT "FK_f3afc9f2012eb60fd6c92427ad9" FOREIGN KEY ("projectId") REFERENCES "Project"("_id") ON DELETE CASCADE ON UPDATE NO ACTION`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceMonitor" ADD CONSTRAINT "FK_dbbd6f4b17276c887a67016373d" FOREIGN KEY ("serviceId") REFERENCES "Service"("_id") ON DELETE CASCADE ON UPDATE NO ACTION`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceMonitor" ADD CONSTRAINT "FK_c34cac2fa25193f64be3ef22ef5" FOREIGN KEY ("monitorId") REFERENCES "Monitor"("_id") ON DELETE CASCADE ON UPDATE NO ACTION`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceMonitor" ADD CONSTRAINT "FK_f3580993ebe0b2019cbb3d6a72e" FOREIGN KEY ("createdByUserId") REFERENCES "User"("_id") ON DELETE SET NULL ON UPDATE NO ACTION`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceMonitor" ADD CONSTRAINT "FK_fef89cf53740936f4c25d335892" FOREIGN KEY ("deletedByUserId") REFERENCES "User"("_id") ON DELETE SET NULL ON UPDATE NO ACTION`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceTelemetryService" ADD CONSTRAINT "FK_27a8afc848b9f8aa39303622f67" FOREIGN KEY ("projectId") REFERENCES "Project"("_id") ON DELETE CASCADE ON UPDATE NO ACTION`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceTelemetryService" ADD CONSTRAINT "FK_0aed874674616c15b0c5a6551e1" FOREIGN KEY ("serviceId") REFERENCES "Service"("_id") ON DELETE CASCADE ON UPDATE NO ACTION`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceTelemetryService" ADD CONSTRAINT "FK_7e94e4b22003ed6ee0409a68d36" FOREIGN KEY ("telemetryServiceId") REFERENCES "TelemetryService"("_id") ON DELETE CASCADE ON UPDATE NO ACTION`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceTelemetryService" ADD CONSTRAINT "FK_07f09fe64f8909a0009a960d947" FOREIGN KEY ("createdByUserId") REFERENCES "User"("_id") ON DELETE SET NULL ON UPDATE NO ACTION`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceTelemetryService" ADD CONSTRAINT "FK_77d3dcf61abc9a4934df4f49640" FOREIGN KEY ("deletedByUserId") REFERENCES "User"("_id") ON DELETE SET NULL ON UPDATE NO ACTION`,
    );
    await queryRunner.query(
      `ALTER TABLE "TelemetryServiceLabel" ADD CONSTRAINT "FK_ebf708a8d435442c8cb229eb4a6" FOREIGN KEY ("telemetryServiceId") REFERENCES "TelemetryService"("_id") ON DELETE CASCADE ON UPDATE CASCADE`,
    );
    await queryRunner.query(
      `ALTER TABLE "TelemetryServiceLabel" ADD CONSTRAINT "FK_a697535be0dc0dfbbbf6a671eea" FOREIGN KEY ("labelId") REFERENCES "Label"("_id") ON DELETE CASCADE ON UPDATE CASCADE`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceLabel" ADD CONSTRAINT "FK_d6d8507cd94721f63f2ba6f7b2c" FOREIGN KEY ("serviceId") REFERENCES "Service"("_id") ON DELETE CASCADE ON UPDATE CASCADE`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceLabel" ADD CONSTRAINT "FK_7711266422ebad1188c4879d669" FOREIGN KEY ("labelId") REFERENCES "Label"("_id") ON DELETE CASCADE ON UPDATE CASCADE`,
    );
  }

  public async down(queryRunner: QueryRunner): Promise<void> {
    await queryRunner.query(
      `ALTER TABLE "ServiceLabel" DROP CONSTRAINT "FK_7711266422ebad1188c4879d669"`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceLabel" DROP CONSTRAINT "FK_d6d8507cd94721f63f2ba6f7b2c"`,
    );
    await queryRunner.query(
      `ALTER TABLE "TelemetryServiceLabel" DROP CONSTRAINT "FK_a697535be0dc0dfbbbf6a671eea"`,
    );
    await queryRunner.query(
      `ALTER TABLE "TelemetryServiceLabel" DROP CONSTRAINT "FK_ebf708a8d435442c8cb229eb4a6"`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceTelemetryService" DROP CONSTRAINT "FK_77d3dcf61abc9a4934df4f49640"`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceTelemetryService" DROP CONSTRAINT "FK_07f09fe64f8909a0009a960d947"`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceTelemetryService" DROP CONSTRAINT "FK_7e94e4b22003ed6ee0409a68d36"`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceTelemetryService" DROP CONSTRAINT "FK_0aed874674616c15b0c5a6551e1"`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceTelemetryService" DROP CONSTRAINT "FK_27a8afc848b9f8aa39303622f67"`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceMonitor" DROP CONSTRAINT "FK_fef89cf53740936f4c25d335892"`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceMonitor" DROP CONSTRAINT "FK_f3580993ebe0b2019cbb3d6a72e"`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceMonitor" DROP CONSTRAINT "FK_c34cac2fa25193f64be3ef22ef5"`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceMonitor" DROP CONSTRAINT "FK_dbbd6f4b17276c887a67016373d"`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceMonitor" DROP CONSTRAINT "FK_f3afc9f2012eb60fd6c92427ad9"`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceDependency" DROP CONSTRAINT "FK_feb830e4e4f8259a871105b16e8"`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceDependency" DROP CONSTRAINT "FK_cc8c8d41106bebab21d1c69e129"`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceDependency" DROP CONSTRAINT "FK_c2562045902370ec46091924fc8"`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceDependency" DROP CONSTRAINT "FK_3af01e69f3e28ae56a968bbd812"`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceDependency" DROP CONSTRAINT "FK_3e2a1ef7e8795a46c2e2e9955c2"`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceCodeRepository" DROP CONSTRAINT "FK_32f46905c9550cee537d0ee47be"`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceCodeRepository" DROP CONSTRAINT "FK_53b00f5184ca7031f625ac5ebf8"`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceCodeRepository" DROP CONSTRAINT "FK_0e2f7235264b77ac7214178da7b"`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceCodeRepository" DROP CONSTRAINT "FK_46327fbb53a5a2f04f1747716ca"`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceCodeRepository" DROP CONSTRAINT "FK_3497e882e1590e6f9abca00ac4b"`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceOwnerUser" DROP CONSTRAINT "FK_18d406f83326e42bda4873a58ac"`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceOwnerUser" DROP CONSTRAINT "FK_13458e8b37ec9b964cfebc46773"`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceOwnerUser" DROP CONSTRAINT "FK_961199ad1e45039ed116b7c642f"`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceOwnerUser" DROP CONSTRAINT "FK_70f78ff146220713c5ddbfbc505"`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceOwnerUser" DROP CONSTRAINT "FK_b9c710b4ebbb1ef3617310756a2"`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceOwnerTeam" DROP CONSTRAINT "FK_f7afc098ab50af09b5264b87ed3"`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceOwnerTeam" DROP CONSTRAINT "FK_50d71c373bb442613139ffb4776"`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceOwnerTeam" DROP CONSTRAINT "FK_e9a1186a29ab1b4c23a3927470e"`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceOwnerTeam" DROP CONSTRAINT "FK_592b88007d58c6a3710c42201a7"`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceOwnerTeam" DROP CONSTRAINT "FK_f9ce25f74e41b13aa630f536ebb"`,
    );
    await queryRunner.query(
      `ALTER TABLE "Service" DROP CONSTRAINT "FK_bb4eb18e4568cbeacc194c5c977"`,
    );
    await queryRunner.query(
      `ALTER TABLE "Service" DROP CONSTRAINT "FK_73d0dda0cfa1edb9ae4fa2edb65"`,
    );
    await queryRunner.query(
      `ALTER TABLE "Service" DROP CONSTRAINT "FK_ff1320357cbe3d5a1dc7f1e2688"`,
    );
    await queryRunner.query(
      `DROP INDEX "public"."IDX_7711266422ebad1188c4879d66"`,
    );
    await queryRunner.query(
      `DROP INDEX "public"."IDX_d6d8507cd94721f63f2ba6f7b2"`,
    );
    await queryRunner.query(
      `DROP INDEX "public"."IDX_a697535be0dc0dfbbbf6a671ee"`,
    );
    await queryRunner.query(
      `DROP INDEX "public"."IDX_ebf708a8d435442c8cb229eb4a"`,
    );
    await queryRunner.query(
      `DROP INDEX "public"."IDX_7e94e4b22003ed6ee0409a68d3"`,
    );
    await queryRunner.query(
      `DROP INDEX "public"."IDX_0aed874674616c15b0c5a6551e"`,
    );
    await queryRunner.query(
      `DROP INDEX "public"."IDX_27a8afc848b9f8aa39303622f6"`,
    );
    await queryRunner.query(
      `DROP INDEX "public"."IDX_c34cac2fa25193f64be3ef22ef"`,
    );
    await queryRunner.query(
      `DROP INDEX "public"."IDX_dbbd6f4b17276c887a67016373"`,
    );
    await queryRunner.query(
      `DROP INDEX "public"."IDX_f3afc9f2012eb60fd6c92427ad"`,
    );
    await queryRunner.query(
      `DROP INDEX "public"."IDX_c2562045902370ec46091924fc"`,
    );
    await queryRunner.query(
      `DROP INDEX "public"."IDX_3af01e69f3e28ae56a968bbd81"`,
    );
    await queryRunner.query(
      `DROP INDEX "public"."IDX_3e2a1ef7e8795a46c2e2e9955c"`,
    );
    await queryRunner.query(
      `DROP INDEX "public"."IDX_0e2f7235264b77ac7214178da7"`,
    );
    await queryRunner.query(
      `DROP INDEX "public"."IDX_46327fbb53a5a2f04f1747716c"`,
    );
    await queryRunner.query(
      `DROP INDEX "public"."IDX_3497e882e1590e6f9abca00ac4"`,
    );
    await queryRunner.query(
      `DROP INDEX "public"."IDX_961199ad1e45039ed116b7c642"`,
    );
    await queryRunner.query(
      `DROP INDEX "public"."IDX_70f78ff146220713c5ddbfbc50"`,
    );
    await queryRunner.query(
      `DROP INDEX "public"."IDX_b9c710b4ebbb1ef3617310756a"`,
    );
    await queryRunner.query(
      `DROP INDEX "public"."IDX_e9a1186a29ab1b4c23a3927470"`,
    );
    await queryRunner.query(
      `DROP INDEX "public"."IDX_592b88007d58c6a3710c42201a"`,
    );
    await queryRunner.query(
      `DROP INDEX "public"."IDX_f9ce25f74e41b13aa630f536eb"`,
    );
    await queryRunner.query(
      `DROP INDEX "public"."IDX_ff1320357cbe3d5a1dc7f1e268"`,
    );
    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 INDEX "IDX_701f84e45404bdddcffdcaaba2" ON "ServiceLabel" ("labelId") `,
    );
    await queryRunner.query(
      `CREATE INDEX "IDX_98e9d83b6ff61003a29590f398" ON "ServiceLabel" ("serviceId") `,
    );
    await queryRunner.query(
      `CREATE INDEX "IDX_7711266422ebad1188c4879d66" ON "TelemetryServiceLabel" ("labelId") `,
    );
    await queryRunner.query(
      `CREATE INDEX "IDX_94d495f938d819dab20480c5f8" ON "TelemetryServiceLabel" ("telemetryServiceId") `,
    );
    await queryRunner.query(
      `CREATE INDEX "IDX_0e147801744032a9b33ee87982" ON "ServiceTelemetryService" ("telemetryServiceId") `,
    );
    await queryRunner.query(
      `CREATE INDEX "IDX_d8010d867aee38375f92dcf5a0" ON "ServiceTelemetryService" ("serviceId") `,
    );
    await queryRunner.query(
      `CREATE INDEX "IDX_8193db094ffae0498ed3425e36" ON "ServiceTelemetryService" ("projectId") `,
    );
    await queryRunner.query(
      `CREATE INDEX "IDX_b3cdff92c6b8c874e3406b2add" ON "ServiceMonitor" ("monitorId") `,
    );
    await queryRunner.query(
      `CREATE INDEX "IDX_8becc4dbab47d9c6cbdcdcd4dc" ON "ServiceMonitor" ("serviceId") `,
    );
    await queryRunner.query(
      `CREATE INDEX "IDX_4ea52669c01c5ec8920d5d4b6d" ON "ServiceMonitor" ("projectId") `,
    );
    await queryRunner.query(
      `CREATE INDEX "IDX_84855f72c816f5fa05c7636581" ON "ServiceDependency" ("dependencyServiceId") `,
    );
    await queryRunner.query(
      `CREATE INDEX "IDX_bd2b648fe0cd2955d73286f3f9" ON "ServiceDependency" ("serviceId") `,
    );
    await queryRunner.query(
      `CREATE INDEX "IDX_5d213c12854b956ed3c7f5f82f" ON "ServiceDependency" ("projectId") `,
    );
    await queryRunner.query(
      `CREATE INDEX "IDX_05b6c65746b28329def0accba9" ON "ServiceCodeRepository" ("codeRepositoryId") `,
    );
    await queryRunner.query(
      `CREATE INDEX "IDX_4638e464dc7cab644c7926674b" ON "ServiceCodeRepository" ("serviceId") `,
    );
    await queryRunner.query(
      `CREATE INDEX "IDX_41a90624dfbb954e3b50c93dfc" ON "ServiceCodeRepository" ("projectId") `,
    );
    await queryRunner.query(
      `CREATE INDEX "IDX_27a396dd77fb8c0d5d6cb89216" ON "ServiceOwnerUser" ("serviceId") `,
    );
    await queryRunner.query(
      `CREATE INDEX "IDX_f6abd337058906d7912164ae12" ON "ServiceOwnerUser" ("userId") `,
    );
    await queryRunner.query(
      `CREATE INDEX "IDX_51c375fe9f6ffb0372d3425d99" ON "ServiceOwnerUser" ("projectId") `,
    );
    await queryRunner.query(
      `CREATE INDEX "IDX_c015513688ebd42e5569b4d6ac" ON "ServiceOwnerTeam" ("serviceId") `,
    );
    await queryRunner.query(
      `CREATE INDEX "IDX_e3090773a4106e0c4375897993" ON "ServiceOwnerTeam" ("teamId") `,
    );
    await queryRunner.query(
      `CREATE INDEX "IDX_726241162b0a853b29d85e28c4" ON "ServiceOwnerTeam" ("projectId") `,
    );
    await queryRunner.query(
      `CREATE INDEX "IDX_e712ff4cf5c1a865a5baa242e2" ON "Service" ("projectId") `,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceLabel" ADD CONSTRAINT "FK_701f84e45404bdddcffdcaaba20" FOREIGN KEY ("labelId") REFERENCES "Label"("_id") ON DELETE CASCADE ON UPDATE CASCADE`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceLabel" ADD CONSTRAINT "FK_98e9d83b6ff61003a29590f3987" FOREIGN KEY ("serviceId") REFERENCES "Service"("_id") ON DELETE CASCADE ON UPDATE CASCADE`,
    );
    await queryRunner.query(
      `ALTER TABLE "TelemetryServiceLabel" ADD CONSTRAINT "FK_7711266422ebad1188c4879d669" FOREIGN KEY ("labelId") REFERENCES "Label"("_id") ON DELETE CASCADE ON UPDATE CASCADE`,
    );
    await queryRunner.query(
      `ALTER TABLE "TelemetryServiceLabel" ADD CONSTRAINT "FK_94d495f938d819dab20480c5f80" FOREIGN KEY ("telemetryServiceId") REFERENCES "TelemetryService"("_id") ON DELETE CASCADE ON UPDATE CASCADE`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceTelemetryService" ADD CONSTRAINT "FK_b0419b3b36e6606a404eb97a98a" FOREIGN KEY ("deletedByUserId") REFERENCES "User"("_id") ON DELETE SET NULL ON UPDATE NO ACTION`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceTelemetryService" ADD CONSTRAINT "FK_64a7908ff27c562a2d7f5532e2a" FOREIGN KEY ("createdByUserId") REFERENCES "User"("_id") ON DELETE SET NULL ON UPDATE NO ACTION`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceTelemetryService" ADD CONSTRAINT "FK_0e147801744032a9b33ee879829" FOREIGN KEY ("telemetryServiceId") REFERENCES "TelemetryService"("_id") ON DELETE CASCADE ON UPDATE NO ACTION`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceTelemetryService" ADD CONSTRAINT "FK_d8010d867aee38375f92dcf5a02" FOREIGN KEY ("serviceId") REFERENCES "Service"("_id") ON DELETE CASCADE ON UPDATE NO ACTION`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceTelemetryService" ADD CONSTRAINT "FK_8193db094ffae0498ed3425e36a" FOREIGN KEY ("projectId") REFERENCES "Project"("_id") ON DELETE CASCADE ON UPDATE NO ACTION`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceMonitor" ADD CONSTRAINT "FK_1783ec2972d9cbf2f91fced5be3" FOREIGN KEY ("deletedByUserId") REFERENCES "User"("_id") ON DELETE SET NULL ON UPDATE NO ACTION`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceMonitor" ADD CONSTRAINT "FK_e8e03c07999471753b9f6093a67" FOREIGN KEY ("createdByUserId") REFERENCES "User"("_id") ON DELETE SET NULL ON UPDATE NO ACTION`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceMonitor" ADD CONSTRAINT "FK_b3cdff92c6b8c874e3406b2add5" FOREIGN KEY ("monitorId") REFERENCES "Monitor"("_id") ON DELETE CASCADE ON UPDATE NO ACTION`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceMonitor" ADD CONSTRAINT "FK_8becc4dbab47d9c6cbdcdcd4dc9" FOREIGN KEY ("serviceId") REFERENCES "Service"("_id") ON DELETE CASCADE ON UPDATE NO ACTION`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceMonitor" ADD CONSTRAINT "FK_4ea52669c01c5ec8920d5d4b6da" FOREIGN KEY ("projectId") REFERENCES "Project"("_id") ON DELETE CASCADE ON UPDATE NO ACTION`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceDependency" ADD CONSTRAINT "FK_a4e505f3feab672e2dbbb3a58a1" FOREIGN KEY ("deletedByUserId") REFERENCES "User"("_id") ON DELETE SET NULL ON UPDATE NO ACTION`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceDependency" ADD CONSTRAINT "FK_3741c2e3d35cb739451e50fcac2" FOREIGN KEY ("createdByUserId") REFERENCES "User"("_id") ON DELETE SET NULL ON UPDATE NO ACTION`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceDependency" ADD CONSTRAINT "FK_84855f72c816f5fa05c76365810" FOREIGN KEY ("dependencyServiceId") REFERENCES "Service"("_id") ON DELETE CASCADE ON UPDATE NO ACTION`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceDependency" ADD CONSTRAINT "FK_bd2b648fe0cd2955d73286f3f90" FOREIGN KEY ("serviceId") REFERENCES "Service"("_id") ON DELETE CASCADE ON UPDATE NO ACTION`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceDependency" ADD CONSTRAINT "FK_5d213c12854b956ed3c7f5f82f5" FOREIGN KEY ("projectId") REFERENCES "Project"("_id") ON DELETE CASCADE ON UPDATE NO ACTION`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceCodeRepository" ADD CONSTRAINT "FK_1aae6b3a023a36f7c004749afe4" FOREIGN KEY ("deletedByUserId") REFERENCES "User"("_id") ON DELETE SET NULL ON UPDATE NO ACTION`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceCodeRepository" ADD CONSTRAINT "FK_c838ecb46958f5de7a699f50c53" FOREIGN KEY ("createdByUserId") REFERENCES "User"("_id") ON DELETE SET NULL ON UPDATE NO ACTION`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceCodeRepository" ADD CONSTRAINT "FK_05b6c65746b28329def0accba94" FOREIGN KEY ("codeRepositoryId") REFERENCES "CodeRepository"("_id") ON DELETE CASCADE ON UPDATE NO ACTION`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceCodeRepository" ADD CONSTRAINT "FK_4638e464dc7cab644c7926674b8" FOREIGN KEY ("serviceId") REFERENCES "Service"("_id") ON DELETE CASCADE ON UPDATE NO ACTION`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceCodeRepository" ADD CONSTRAINT "FK_41a90624dfbb954e3b50c93dfc1" FOREIGN KEY ("projectId") REFERENCES "Project"("_id") ON DELETE CASCADE ON UPDATE NO ACTION`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceOwnerUser" ADD CONSTRAINT "FK_d61607e823057b6516f05e8f1cd" FOREIGN KEY ("deletedByUserId") REFERENCES "User"("_id") ON DELETE SET NULL ON UPDATE NO ACTION`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceOwnerUser" ADD CONSTRAINT "FK_2d2c21db8da169b5b2d2bee3111" FOREIGN KEY ("createdByUserId") REFERENCES "User"("_id") ON DELETE SET NULL ON UPDATE NO ACTION`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceOwnerUser" ADD CONSTRAINT "FK_27a396dd77fb8c0d5d6cb892165" FOREIGN KEY ("serviceId") REFERENCES "Service"("_id") ON DELETE CASCADE ON UPDATE NO ACTION`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceOwnerUser" ADD CONSTRAINT "FK_f6abd337058906d7912164ae12e" FOREIGN KEY ("userId") REFERENCES "User"("_id") ON DELETE CASCADE ON UPDATE NO ACTION`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceOwnerUser" ADD CONSTRAINT "FK_51c375fe9f6ffb0372d3425d999" FOREIGN KEY ("projectId") REFERENCES "Project"("_id") ON DELETE CASCADE ON UPDATE NO ACTION`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceOwnerTeam" ADD CONSTRAINT "FK_0e93a638ddc94aaad4ad33789d7" FOREIGN KEY ("deletedByUserId") REFERENCES "User"("_id") ON DELETE SET NULL ON UPDATE NO ACTION`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceOwnerTeam" ADD CONSTRAINT "FK_9afb156569266f66a2301eb09ff" FOREIGN KEY ("createdByUserId") REFERENCES "User"("_id") ON DELETE SET NULL ON UPDATE NO ACTION`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceOwnerTeam" ADD CONSTRAINT "FK_c015513688ebd42e5569b4d6ac6" FOREIGN KEY ("serviceId") REFERENCES "Service"("_id") ON DELETE CASCADE ON UPDATE NO ACTION`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceOwnerTeam" ADD CONSTRAINT "FK_e3090773a4106e0c4375897993f" FOREIGN KEY ("teamId") REFERENCES "Team"("_id") ON DELETE CASCADE ON UPDATE NO ACTION`,
    );
    await queryRunner.query(
      `ALTER TABLE "ServiceOwnerTeam" ADD CONSTRAINT "FK_726241162b0a853b29d85e28c4c" FOREIGN KEY ("projectId") REFERENCES "Project"("_id") ON DELETE CASCADE ON UPDATE NO ACTION`,
    );
    await queryRunner.query(
      `ALTER TABLE "Service" ADD CONSTRAINT "FK_42f81942e36f5f42a5dce8e606d" FOREIGN KEY ("deletedByUserId") REFERENCES "User"("_id") ON DELETE SET NULL ON UPDATE NO ACTION`,
    );
    await queryRunner.query(
      `ALTER TABLE "Service" ADD CONSTRAINT "FK_b8d64daaf462acd6f694ca47dad" FOREIGN KEY ("createdByUserId") REFERENCES "User"("_id") ON DELETE SET NULL ON UPDATE NO ACTION`,
    );
    await queryRunner.query(
      `ALTER TABLE "Service" ADD CONSTRAINT "FK_e712ff4cf5c1a865a5baa242e2e" FOREIGN KEY ("projectId") REFERENCES "Project"("_id") ON DELETE CASCADE ON UPDATE NO ACTION`,
    );
  }
}
