From 82444483b24f60b277fe72a02ad1963705aa36f5 Mon Sep 17 00:00:00 2001 From: William Allen Date: Tue, 15 Sep 2026 13:46:08 -0400 Subject: [PATCH] Update `testoutput.id` migration to not require superuser The `testoutput` ID column migration currently fails for instances where the postgres user is not a superuser. This resolves the issue by only disabling user triggers. A side effect of this change is that foreign-key constraints are no longer disabled, which may slow down the migration on some systems. --- .../2026_08_19_200553_testoutput_id_column_type.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/database/migrations/2026_08_19_200553_testoutput_id_column_type.php b/database/migrations/2026_08_19_200553_testoutput_id_column_type.php index 416f797721..855f66068c 100644 --- a/database/migrations/2026_08_19_200553_testoutput_id_column_type.php +++ b/database/migrations/2026_08_19_200553_testoutput_id_column_type.php @@ -7,8 +7,8 @@ public function up(): void { // Disable triggers temporarily - DB::statement('ALTER TABLE build2test DISABLE TRIGGER ALL'); - DB::statement('ALTER TABLE testoutput DISABLE TRIGGER ALL'); + DB::statement('ALTER TABLE build2test DISABLE TRIGGER USER'); + DB::statement('ALTER TABLE testoutput DISABLE TRIGGER USER'); // Dynamically find and drop all indexes on testoutput EXCEPT the primary key DB::statement(" @@ -52,8 +52,8 @@ public function up(): void DB::statement('CREATE INDEX ON testoutput USING hash (output)'); // Re-enable triggers - DB::statement('ALTER TABLE build2test ENABLE TRIGGER ALL'); - DB::statement('ALTER TABLE testoutput ENABLE TRIGGER ALL'); + DB::statement('ALTER TABLE build2test ENABLE TRIGGER USER'); + DB::statement('ALTER TABLE testoutput ENABLE TRIGGER USER'); } public function down(): void