Refactoring for 3tier setup BOD-83

This commit is contained in:
Patrick Fic
2020-05-29 17:31:28 -07:00
parent e7da6700b7
commit 5564b5dc4a
28 changed files with 742 additions and 140 deletions

View File

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

View File

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

View File

@@ -0,0 +1,50 @@
- args:
role: user
table:
name: bodyshops
schema: public
type: drop_select_permission
- args:
permission:
allow_aggregations: false
columns:
- address1
- address2
- city
- country
- created_at
- email
- federal_tax_id
- id
- inhousevendorid
- insurance_vendor_id
- intakechecklist
- invoice_tax_rates
- logo_img_path
- md_order_statuses
- md_responsibility_centers
- md_ro_statuses
- messagingservicesid
- production_config
- region_config
- shopname
- shoprates
- state
- state_tax_id
- template_header
- textid
- updated_at
- zip_post
computed_fields: []
filter:
associations:
bodyshop:
associations:
user:
authid:
_eq: X-Hasura-User-Id
role: user
table:
name: bodyshops
schema: public
type: create_select_permission

View File

@@ -0,0 +1,51 @@
- args:
role: user
table:
name: bodyshops
schema: public
type: drop_select_permission
- args:
permission:
allow_aggregations: false
columns:
- accountingconfig
- address1
- address2
- city
- country
- created_at
- email
- federal_tax_id
- id
- inhousevendorid
- insurance_vendor_id
- intakechecklist
- invoice_tax_rates
- logo_img_path
- md_order_statuses
- md_responsibility_centers
- md_ro_statuses
- messagingservicesid
- production_config
- region_config
- shopname
- shoprates
- state
- state_tax_id
- template_header
- textid
- updated_at
- zip_post
computed_fields: []
filter:
associations:
bodyshop:
associations:
user:
authid:
_eq: X-Hasura-User-Id
role: user
table:
name: bodyshops
schema: public
type: create_select_permission

View File

@@ -0,0 +1,48 @@
- args:
role: user
table:
name: bodyshops
schema: public
type: drop_update_permission
- args:
permission:
columns:
- address1
- address2
- city
- country
- created_at
- email
- federal_tax_id
- id
- inhousevendorid
- insurance_vendor_id
- intakechecklist
- invoice_tax_rates
- logo_img_path
- md_order_statuses
- md_responsibility_centers
- md_ro_statuses
- production_config
- shopname
- shoprates
- state
- state_tax_id
- updated_at
- zip_post
filter:
associations:
bodyshop:
associations:
user:
authid:
_eq: X-Hasura-User-Id
localPresets:
- key: ""
value: ""
set: {}
role: user
table:
name: bodyshops
schema: public
type: create_update_permission

View File

@@ -0,0 +1,49 @@
- args:
role: user
table:
name: bodyshops
schema: public
type: drop_update_permission
- args:
permission:
columns:
- accountingconfig
- address1
- address2
- city
- country
- created_at
- email
- federal_tax_id
- id
- inhousevendorid
- insurance_vendor_id
- intakechecklist
- invoice_tax_rates
- logo_img_path
- md_order_statuses
- md_responsibility_centers
- md_ro_statuses
- production_config
- shopname
- shoprates
- state
- state_tax_id
- updated_at
- zip_post
filter:
associations:
bodyshop:
associations:
user:
authid:
_eq: X-Hasura-User-Id
localPresets:
- key: ""
value: ""
set: {}
role: user
table:
name: bodyshops
schema: public
type: create_update_permission

View File

@@ -0,0 +1 @@
[]

View File

@@ -0,0 +1,7 @@
- args:
cascade: true
read_only: false
sql: |-
alter table owners
drop column accountingid;
type: run_sql

View File

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

View File

@@ -0,0 +1,5 @@
- args:
cascade: false
read_only: false
sql: ALTER TABLE "public"."owners" ADD COLUMN "accountingid" bigserial NOT NULL;
type: run_sql

View File

@@ -0,0 +1,6 @@
- args:
role: user
table:
name: owners
schema: public
type: drop_insert_permission

View File

@@ -0,0 +1,42 @@
- args:
permission:
allow_upsert: true
check:
bodyshop:
associations:
_and:
- user:
authid:
_eq: X-Hasura-User-Id
- active:
_eq: true
columns:
- id
- created_at
- updated_at
- ownr_fn
- ownr_ln
- ownr_addr1
- ownr_addr2
- ownr_city
- ownr_st
- ownr_zip
- ownr_ctry
- ownr_ea
- ownr_ph1
- preferred_contact
- allow_text_message
- shopid
- ownr_ph2
- ownr_co_nm
- ownr_title
- accountingid
localPresets:
- key: ""
value: ""
set: {}
role: user
table:
name: owners
schema: public
type: create_insert_permission

View File

@@ -0,0 +1,6 @@
- args:
role: user
table:
name: owners
schema: public
type: drop_select_permission

View File

@@ -0,0 +1,40 @@
- args:
permission:
allow_aggregations: false
columns:
- allow_text_message
- accountingid
- ownr_addr1
- ownr_addr2
- ownr_city
- ownr_co_nm
- ownr_ctry
- ownr_ea
- ownr_fn
- ownr_ln
- ownr_ph1
- ownr_ph2
- ownr_st
- ownr_title
- ownr_zip
- preferred_contact
- created_at
- updated_at
- id
- shopid
computed_fields: []
filter:
bodyshop:
associations:
_and:
- user:
authid:
_eq: X-Hasura-User-Id
- active:
_eq: true
limit: null
role: user
table:
name: owners
schema: public
type: create_select_permission

View File

@@ -0,0 +1,6 @@
- args:
role: user
table:
name: owners
schema: public
type: drop_update_permission

View File

@@ -0,0 +1,41 @@
- args:
permission:
columns:
- allow_text_message
- accountingid
- ownr_addr1
- ownr_addr2
- ownr_city
- ownr_co_nm
- ownr_ctry
- ownr_ea
- ownr_fn
- ownr_ln
- ownr_ph1
- ownr_ph2
- ownr_st
- ownr_title
- ownr_zip
- preferred_contact
- created_at
- updated_at
- id
- shopid
filter:
bodyshop:
associations:
_and:
- user:
authid:
_eq: X-Hasura-User-Id
- active:
_eq: true
localPresets:
- key: ""
value: ""
set: {}
role: user
table:
name: owners
schema: public
type: create_update_permission

View File

@@ -444,6 +444,7 @@ tables:
- role: user
permission:
columns:
- accountingconfig
- address1
- address2
- city
@@ -482,6 +483,7 @@ tables:
- role: user
permission:
columns:
- accountingconfig
- address1
- address2
- city
@@ -2840,34 +2842,32 @@ tables:
- active:
_eq: true
columns:
- accountingid
- allow_text_message
- created_at
- id
- created_at
- updated_at
- ownr_fn
- ownr_ln
- ownr_addr1
- ownr_addr2
- ownr_city
- ownr_co_nm
- ownr_st
- ownr_zip
- ownr_ctry
- ownr_ea
- ownr_fn
- ownr_ln
- ownr_ph1
- ownr_ph2
- ownr_st
- ownr_title
- ownr_zip
- preferred_contact
- allow_text_message
- shopid
- updated_at
- ownr_ph2
- ownr_co_nm
- ownr_title
- accountingid
select_permissions:
- role: user
permission:
columns:
- accountingid
- allow_text_message
- created_at
- id
- accountingid
- ownr_addr1
- ownr_addr2
- ownr_city
@@ -2882,8 +2882,10 @@ tables:
- ownr_title
- ownr_zip
- preferred_contact
- shopid
- created_at
- updated_at
- id
- shopid
filter:
bodyshop:
associations:
@@ -2897,10 +2899,8 @@ tables:
- role: user
permission:
columns:
- accountingid
- allow_text_message
- created_at
- id
- accountingid
- ownr_addr1
- ownr_addr2
- ownr_city
@@ -2915,8 +2915,10 @@ tables:
- ownr_title
- ownr_zip
- preferred_contact
- shopid
- created_at
- updated_at
- id
- shopid
filter:
bodyshop:
associations: