Further table updates to remove job statuses.

This commit is contained in:
Patrick Fic
2020-02-06 15:11:27 -08:00
parent 8761dafdff
commit f00ae5335f
14 changed files with 82 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
- args:
name: job_status
table:
name: jobs
schema: public
using:
foreign_key_constraint_on: statusid
type: create_object_relationship

View File

@@ -0,0 +1,6 @@
- args:
relationship: job_status
table:
name: jobs
schema: public
type: drop_relationship

View File

@@ -0,0 +1,8 @@
- args:
name: bodyshop
table:
name: job_status
schema: public
using:
foreign_key_constraint_on: shopid
type: create_object_relationship

View File

@@ -0,0 +1,6 @@
- args:
relationship: bodyshop
table:
name: job_status
schema: public
type: drop_relationship

View File

@@ -0,0 +1,12 @@
- args:
name: jobs
table:
name: job_status
schema: public
using:
foreign_key_constraint_on:
column: statusid
table:
name: jobs
schema: public
type: create_array_relationship

View File

@@ -0,0 +1,6 @@
- args:
relationship: jobs
table:
name: job_status
schema: public
type: drop_relationship

View File

@@ -0,0 +1,12 @@
- args:
name: job_statuses
table:
name: bodyshops
schema: public
using:
foreign_key_constraint_on:
column: shopid
table:
name: job_status
schema: public
type: create_array_relationship

View File

@@ -0,0 +1,6 @@
- args:
relationship: job_statuses
table:
name: bodyshops
schema: public
type: drop_relationship

View File

@@ -0,0 +1,4 @@
- args:
sql: alter table "public"."job_status" add foreign key ("shopid") references "public"."bodyshops"("id")
on update cascade on delete cascade;
type: run_sql

View File

@@ -0,0 +1,3 @@
- args:
sql: alter table "public"."job_status" drop constraint "job_status_shopid_fkey";
type: run_sql

View File

@@ -0,0 +1,4 @@
- args:
sql: alter table "public"."jobs" add foreign key ("statusid") references "public"."job_status"("id")
on update restrict on delete restrict;
type: run_sql

View File

@@ -0,0 +1,3 @@
- args:
sql: alter table "public"."jobs" drop constraint "jobs_statusid_fkey";
type: run_sql

View File

@@ -0,0 +1,3 @@
- args:
sql: DROP TABLE "public"."job_status"
type: run_sql