From afcc27c5cdca18555b09c0153324172a56539720 Mon Sep 17 00:00:00 2001 From: motatoes Date: Wed, 24 Jul 2024 21:54:46 +0100 Subject: [PATCH] fix the migration script --- .../20240724204034_digger_job_tokens_edit_orgid.sql | 6 ++++++ supabase/migrations/20240724205344_digger_job_tokens_fk.sql | 3 +++ 2 files changed, 9 insertions(+) create mode 100644 supabase/migrations/20240724204034_digger_job_tokens_edit_orgid.sql create mode 100644 supabase/migrations/20240724205344_digger_job_tokens_fk.sql diff --git a/supabase/migrations/20240724204034_digger_job_tokens_edit_orgid.sql b/supabase/migrations/20240724204034_digger_job_tokens_edit_orgid.sql new file mode 100644 index 00000000..a42a64b3 --- /dev/null +++ b/supabase/migrations/20240724204034_digger_job_tokens_edit_orgid.sql @@ -0,0 +1,6 @@ +ALTER TABLE digger_job_tokens +DROP COLUMN organisation_id; + +ALTER TABLE digger_job_tokens +ADD COLUMN organisation_id UUID; + diff --git a/supabase/migrations/20240724205344_digger_job_tokens_fk.sql b/supabase/migrations/20240724205344_digger_job_tokens_fk.sql new file mode 100644 index 00000000..b01a62ee --- /dev/null +++ b/supabase/migrations/20240724205344_digger_job_tokens_fk.sql @@ -0,0 +1,3 @@ +ALTER TABLE digger_job_tokens +ADD CONSTRAINT fk_jt_organisation_id +FOREIGN KEY (organisation_id) REFERENCES organizations(id);