IO-1096 Added order by to Parts Order

This commit is contained in:
Patrick Fic
2021-06-02 08:49:10 -07:00
parent 28326f2628
commit 9ff9baa78c
29 changed files with 461 additions and 47 deletions

View File

@@ -0,0 +1,5 @@
- args:
cascade: false
read_only: false
sql: ALTER TABLE "public"."conversations" DROP COLUMN "archived";
type: run_sql

View File

@@ -0,0 +1,6 @@
- args:
cascade: false
read_only: false
sql: ALTER TABLE "public"."conversations" ADD COLUMN "archived" boolean NOT NULL
DEFAULT false;
type: run_sql

View File

@@ -0,0 +1,5 @@
- args:
cascade: false
read_only: false
sql: ALTER TABLE "public"."parts_orders" DROP COLUMN "orderedby";
type: run_sql

View File

@@ -0,0 +1,5 @@
- args:
cascade: false
read_only: false
sql: ALTER TABLE "public"."parts_orders" ADD COLUMN "orderedby" text NULL;
type: run_sql

View File

@@ -0,0 +1,5 @@
- args:
cascade: false
read_only: false
sql: alter table "public"."parts_orders" drop constraint "parts_orders_orderedby_fkey";
type: run_sql

View File

@@ -0,0 +1,10 @@
- args:
cascade: false
read_only: false
sql: |-
alter table "public"."parts_orders"
add constraint "parts_orders_orderedby_fkey"
foreign key ("orderedby")
references "public"."users"
("email") on update set null on delete set null;
type: run_sql

View File

@@ -0,0 +1,37 @@
- args:
role: user
table:
name: parts_orders
schema: public
type: drop_insert_permission
- args:
permission:
check:
job:
bodyshop:
associations:
_and:
- user:
authid:
_eq: X-Hasura-User-Id
- active:
_eq: true
columns:
- created_at
- deliver_by
- id
- jobid
- order_date
- order_number
- return
- returnfrombill
- status
- updated_at
- user_email
- vendorid
set: {}
role: user
table:
name: parts_orders
schema: public
type: create_insert_permission

View File

@@ -0,0 +1,38 @@
- args:
role: user
table:
name: parts_orders
schema: public
type: drop_insert_permission
- args:
permission:
check:
job:
bodyshop:
associations:
_and:
- user:
authid:
_eq: X-Hasura-User-Id
- active:
_eq: true
columns:
- created_at
- deliver_by
- id
- jobid
- order_date
- order_number
- orderedby
- return
- returnfrombill
- status
- updated_at
- user_email
- vendorid
set: {}
role: user
table:
name: parts_orders
schema: public
type: create_insert_permission

View File

@@ -0,0 +1,38 @@
- args:
role: user
table:
name: parts_orders
schema: public
type: drop_select_permission
- args:
permission:
allow_aggregations: false
columns:
- created_at
- deliver_by
- id
- jobid
- order_date
- order_number
- return
- returnfrombill
- status
- updated_at
- user_email
- vendorid
computed_fields: []
filter:
job:
bodyshop:
associations:
_and:
- user:
authid:
_eq: X-Hasura-User-Id
- active:
_eq: true
role: user
table:
name: parts_orders
schema: public
type: create_select_permission

View File

@@ -0,0 +1,39 @@
- args:
role: user
table:
name: parts_orders
schema: public
type: drop_select_permission
- args:
permission:
allow_aggregations: false
columns:
- created_at
- deliver_by
- id
- jobid
- order_date
- order_number
- orderedby
- return
- returnfrombill
- status
- updated_at
- user_email
- vendorid
computed_fields: []
filter:
job:
bodyshop:
associations:
_and:
- user:
authid:
_eq: X-Hasura-User-Id
- active:
_eq: true
role: user
table:
name: parts_orders
schema: public
type: create_select_permission

View File

@@ -0,0 +1,36 @@
- args:
role: user
table:
name: parts_orders
schema: public
type: drop_update_permission
- args:
permission:
columns:
- created_at
- deliver_by
- id
- jobid
- order_date
- order_number
- returnfrombill
- status
- updated_at
- user_email
- vendorid
filter:
job:
bodyshop:
associations:
_and:
- user:
authid:
_eq: X-Hasura-User-Id
- active:
_eq: true
set: {}
role: user
table:
name: parts_orders
schema: public
type: create_update_permission

View File

@@ -0,0 +1,37 @@
- args:
role: user
table:
name: parts_orders
schema: public
type: drop_update_permission
- args:
permission:
columns:
- created_at
- deliver_by
- id
- jobid
- order_date
- order_number
- orderedby
- returnfrombill
- status
- updated_at
- user_email
- vendorid
filter:
job:
bodyshop:
associations:
_and:
- user:
authid:
_eq: X-Hasura-User-Id
- active:
_eq: true
set: {}
role: user
table:
name: parts_orders
schema: public
type: create_update_permission

View File

@@ -0,0 +1,30 @@
- args:
role: user
table:
name: conversations
schema: public
type: drop_select_permission
- args:
permission:
allow_aggregations: true
columns:
- phone_num
- created_at
- updated_at
- bodyshopid
- id
computed_fields: []
filter:
bodyshop:
associations:
_and:
- user:
authid:
_eq: X-Hasura-User-Id
- active:
_eq: true
role: user
table:
name: conversations
schema: public
type: create_select_permission

View File

@@ -0,0 +1,31 @@
- args:
role: user
table:
name: conversations
schema: public
type: drop_select_permission
- args:
permission:
allow_aggregations: true
columns:
- archived
- bodyshopid
- created_at
- id
- phone_num
- updated_at
computed_fields: []
filter:
bodyshop:
associations:
_and:
- user:
authid:
_eq: X-Hasura-User-Id
- active:
_eq: true
role: user
table:
name: conversations
schema: public
type: create_select_permission

View File

@@ -0,0 +1,29 @@
- args:
role: user
table:
name: conversations
schema: public
type: drop_update_permission
- args:
permission:
columns:
- phone_num
- created_at
- updated_at
- bodyshopid
- id
filter:
bodyshop:
associations:
_and:
- user:
authid:
_eq: X-Hasura-User-Id
- active:
_eq: true
set: {}
role: user
table:
name: conversations
schema: public
type: create_update_permission

View File

@@ -0,0 +1,30 @@
- args:
role: user
table:
name: conversations
schema: public
type: drop_update_permission
- args:
permission:
columns:
- archived
- bodyshopid
- created_at
- id
- phone_num
- updated_at
filter:
bodyshop:
associations:
_and:
- user:
authid:
_eq: X-Hasura-User-Id
- active:
_eq: true
set: {}
role: user
table:
name: conversations
schema: public
type: create_update_permission

View File

@@ -1114,11 +1114,12 @@ tables:
- role: user
permission:
columns:
- phone_num
- created_at
- updated_at
- archived
- bodyshopid
- created_at
- id
- phone_num
- updated_at
filter:
bodyshop:
associations:
@@ -1133,11 +1134,12 @@ tables:
- role: user
permission:
columns:
- phone_num
- created_at
- updated_at
- archived
- bodyshopid
- created_at
- id
- phone_num
- updated_at
filter:
bodyshop:
associations:
@@ -3622,6 +3624,7 @@ tables:
- jobid
- order_date
- order_number
- orderedby
- return
- returnfrombill
- status
@@ -3638,6 +3641,7 @@ tables:
- jobid
- order_date
- order_number
- orderedby
- return
- returnfrombill
- status
@@ -3664,6 +3668,7 @@ tables:
- jobid
- order_date
- order_number
- orderedby
- returnfrombill
- status
- updated_at