Hasura migration changes to change assigned_to to uuid not email.
This commit is contained in:
@@ -5684,6 +5684,9 @@
|
||||
- name: bodyshop
|
||||
using:
|
||||
foreign_key_constraint_on: bodyshopid
|
||||
- name: employee
|
||||
using:
|
||||
foreign_key_constraint_on: assigned_to
|
||||
- name: job
|
||||
using:
|
||||
foreign_key_constraint_on: jobid
|
||||
@@ -5693,9 +5696,6 @@
|
||||
- name: parts_order
|
||||
using:
|
||||
foreign_key_constraint_on: partsorderid
|
||||
- name: user
|
||||
using:
|
||||
foreign_key_constraint_on: assigned_to
|
||||
- name: userByCreatedBy
|
||||
using:
|
||||
foreign_key_constraint_on: created_by
|
||||
@@ -5736,25 +5736,25 @@
|
||||
- role: user
|
||||
permission:
|
||||
columns:
|
||||
- completed
|
||||
- deleted
|
||||
- priority
|
||||
- assigned_to
|
||||
- created_by
|
||||
- description
|
||||
- title
|
||||
- completed_at
|
||||
- created_at
|
||||
- deleted_at
|
||||
- due_date
|
||||
- remind_at
|
||||
- updated_at
|
||||
- billid
|
||||
- bodyshopid
|
||||
- completed
|
||||
- completed_at
|
||||
- created_at
|
||||
- created_by
|
||||
- deleted
|
||||
- deleted_at
|
||||
- description
|
||||
- due_date
|
||||
- id
|
||||
- jobid
|
||||
- joblineid
|
||||
- partsorderid
|
||||
- priority
|
||||
- remind_at
|
||||
- remind_at_sent
|
||||
- title
|
||||
- updated_at
|
||||
filter:
|
||||
bodyshop:
|
||||
associations:
|
||||
@@ -5807,7 +5807,7 @@
|
||||
columns: '*'
|
||||
update:
|
||||
columns:
|
||||
- assigned_to
|
||||
- bodyshopid
|
||||
retry_conf:
|
||||
interval_sec: 10
|
||||
num_retries: 3
|
||||
@@ -6191,6 +6191,13 @@
|
||||
table:
|
||||
name: email_audit_trail
|
||||
schema: public
|
||||
- name: employees
|
||||
using:
|
||||
foreign_key_constraint_on:
|
||||
column: user_email
|
||||
table:
|
||||
name: employees
|
||||
schema: public
|
||||
- name: eula_acceptances
|
||||
using:
|
||||
foreign_key_constraint_on:
|
||||
@@ -6240,13 +6247,6 @@
|
||||
table:
|
||||
name: parts_orders
|
||||
schema: public
|
||||
- name: tasks
|
||||
using:
|
||||
foreign_key_constraint_on:
|
||||
column: assigned_to
|
||||
table:
|
||||
name: tasks
|
||||
schema: public
|
||||
- name: tasksByCreatedBy
|
||||
using:
|
||||
foreign_key_constraint_on:
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
alter table "public"."tasks" drop constraint "tasks_created_by_fkey2";
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
@@ -0,0 +1 @@
|
||||
alter table "public"."tasks" drop constraint "tasks_created_by_fkey2";
|
||||
@@ -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;
|
||||
@@ -0,0 +1 @@
|
||||
alter table "public"."tasks" drop constraint "tasks_assigned_to_fkey";
|
||||
@@ -0,0 +1,2 @@
|
||||
alter table "public"."tasks" alter column "assigned_to" drop not null;
|
||||
alter table "public"."tasks" add column "assigned_to" text;
|
||||
@@ -0,0 +1 @@
|
||||
alter table "public"."tasks" drop column "assigned_to" cascade;
|
||||
@@ -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;
|
||||
@@ -0,0 +1,2 @@
|
||||
alter table "public"."tasks" add column "assigned_to" uuid
|
||||
null;
|
||||
@@ -0,0 +1 @@
|
||||
alter table "public"."tasks" drop constraint "tasks_assigned_to_fkey";
|
||||
@@ -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;
|
||||
Reference in New Issue
Block a user