Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

db: add id to error table (#36208)

Charisc0b6ebd07af6
diff --git a/supabase/migrations/20250605201937_error_codes_table_ids.sql b/supabase/migrations/20250605201937_error_codes_table_ids.sql
new file mode 100644
index 00000000000..b1aec1d5da2
--- /dev/null
+++ b/supabase/migrations/20250605201937_error_codes_table_ids.sql
@@ -0,0 +1,12 @@
+-- Add an ID column on the error table. It has a composite primary key but
+-- needs an ID column to be able to use it as a foreign key.
+alter table content.error
+add column id uuid unique not null default gen_random_uuid();
+
+grant select (id)
+on content.error
+to anon;
+
+grant select (id)
+on content.error
+to authenticated;