Hasura migration changes to change assigned_to to uuid not email.

This commit is contained in:
Patrick Fic
2024-04-19 08:10:45 -07:00
parent 0b9f718106
commit fb322f760f
13 changed files with 57 additions and 24 deletions

View File

@@ -0,0 +1 @@
alter table "public"."tasks" drop constraint "tasks_created_by_fkey2";

View File

@@ -0,0 +1,5 @@
alter table "public"."tasks"
add constraint "tasks_created_by_fkey2"
foreign key ("created_by")
references "public"."users"
("email") on update restrict on delete restrict;

View File

@@ -0,0 +1,5 @@
alter table "public"."tasks"
add constraint "tasks_created_by_fkey2"
foreign key ("created_by")
references "public"."users"
("email") on update restrict on delete restrict;

View File

@@ -0,0 +1 @@
alter table "public"."tasks" drop constraint "tasks_created_by_fkey2";

View File

@@ -0,0 +1,5 @@
alter table "public"."tasks"
add constraint "tasks_assigned_to_fkey"
foreign key ("assigned_to")
references "public"."users"
("email") on update restrict on delete restrict;

View File

@@ -0,0 +1 @@
alter table "public"."tasks" drop constraint "tasks_assigned_to_fkey";

View File

@@ -0,0 +1,2 @@
alter table "public"."tasks" alter column "assigned_to" drop not null;
alter table "public"."tasks" add column "assigned_to" text;

View File

@@ -0,0 +1 @@
alter table "public"."tasks" drop column "assigned_to" cascade;

View File

@@ -0,0 +1,4 @@
-- Could not auto-generate a down migration.
-- Please write an appropriate down migration for the SQL below:
-- alter table "public"."tasks" add column "assigned_to" uuid
-- null;

View File

@@ -0,0 +1,2 @@
alter table "public"."tasks" add column "assigned_to" uuid
null;

View File

@@ -0,0 +1 @@
alter table "public"."tasks" drop constraint "tasks_assigned_to_fkey";

View File

@@ -0,0 +1,5 @@
alter table "public"."tasks"
add constraint "tasks_assigned_to_fkey"
foreign key ("assigned_to")
references "public"."employees"
("id") on update restrict on delete restrict;