From 29134dc4cc6633677a990a09dbfd19cda6192156 Mon Sep 17 00:00:00 2001 From: James Gunn Date: Wed, 30 Oct 2024 13:03:40 +0000 Subject: [PATCH] Give migrations more time to run (#1635) --- .../20241030104414_BackfillQualificationIdAndAlertId.cs | 6 ++++-- terraform/aks/app.tf | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/TeachingRecordSystem/src/TeachingRecordSystem.Core/DataStore/Postgres/Migrations/20241030104414_BackfillQualificationIdAndAlertId.cs b/TeachingRecordSystem/src/TeachingRecordSystem.Core/DataStore/Postgres/Migrations/20241030104414_BackfillQualificationIdAndAlertId.cs index b1e85ac1a..24660a84f 100644 --- a/TeachingRecordSystem/src/TeachingRecordSystem.Core/DataStore/Postgres/Migrations/20241030104414_BackfillQualificationIdAndAlertId.cs +++ b/TeachingRecordSystem/src/TeachingRecordSystem.Core/DataStore/Postgres/Migrations/20241030104414_BackfillQualificationIdAndAlertId.cs @@ -12,9 +12,11 @@ protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.Sql( """ - update events set qualification_id = (payload #>> Array['MandatoryQualification', 'QualificationId'])::uuid; + update events set qualification_id = (payload #>> Array['MandatoryQualification', 'QualificationId'])::uuid + where (payload #>> Array['MandatoryQualification', 'QualificationId'])::uuid is not null; - update events set alert_id = (payload #>> Array['Alert', 'AlertId'])::uuid; + update events set alert_id = (payload #>> Array['Alert', 'AlertId'])::uuid + where (payload #>> Array['Alert', 'AlertId'])::uuid is not null; """); } diff --git a/terraform/aks/app.tf b/terraform/aks/app.tf index 9351803d4..2e69e3d85 100644 --- a/terraform/aks/app.tf +++ b/terraform/aks/app.tf @@ -43,8 +43,8 @@ resource "kubernetes_job" "migrations" { wait_for_completion = true timeouts { - create = "11m" - update = "11m" + create = "15m" + update = "15m" } }