Working on vendors favorite JSON form - issues with additional fields + rehydrating data

This commit is contained in:
Patrick Fic
2020-02-14 15:57:40 -08:00
parent 12c914affd
commit 34f6f066bc
34 changed files with 1044 additions and 69 deletions

View File

@@ -0,0 +1,9 @@
- args:
sql: ALTER TABLE "public"."vendors" ALTER COLUMN "favorite" TYPE boolean;
type: run_sql
- args:
sql: ALTER TABLE "public"."vendors" ALTER COLUMN "favorite" SET NOT NULL;
type: run_sql
- args:
sql: COMMENT ON COLUMN "public"."vendors"."favorite" IS E'null'
type: run_sql

View File

@@ -0,0 +1,9 @@
- args:
sql: ALTER TABLE "public"."vendors" ALTER COLUMN "favorite" TYPE bool;
type: run_sql
- args:
sql: ALTER TABLE "public"."vendors" ALTER COLUMN "favorite" DROP NOT NULL;
type: run_sql
- args:
sql: COMMENT ON COLUMN "public"."vendors"."favorite" IS E''
type: run_sql

View File

@@ -0,0 +1,47 @@
- args:
role: user
table:
name: vendors
schema: public
type: drop_insert_permission
- args:
permission:
check:
bodyshop:
associations:
_and:
- user:
authid:
_eq: X-Hasura-User-Id
- active:
_eq: true
columns:
- id
- created_at
- updated_at
- bodyshopid
- name
- street1
- street2
- city
- state
- zip
- country
- email
- taxid
- discount
- prompt_discount
- due_date
- terms
- display_name
- cost_center
- favorite
localPresets:
- key: ""
value: ""
set: {}
role: user
table:
name: vendors
schema: public
type: create_insert_permission

View File

@@ -0,0 +1,46 @@
- args:
role: user
table:
name: vendors
schema: public
type: drop_insert_permission
- args:
permission:
check:
bodyshop:
associations:
_and:
- user:
authid:
_eq: X-Hasura-User-Id
- active:
_eq: true
columns:
- bodyshopid
- city
- cost_center
- country
- created_at
- discount
- display_name
- due_date
- email
- id
- name
- prompt_discount
- state
- street1
- street2
- taxid
- terms
- updated_at
- zip
localPresets:
- key: ""
value: ""
set: {}
role: user
table:
name: vendors
schema: public
type: create_insert_permission

View File

@@ -0,0 +1,45 @@
- args:
role: user
table:
name: vendors
schema: public
type: drop_select_permission
- args:
permission:
allow_aggregations: false
columns:
- favorite
- due_date
- discount
- prompt_discount
- city
- cost_center
- country
- display_name
- email
- name
- state
- street1
- street2
- taxid
- terms
- zip
- 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: vendors
schema: public
type: create_select_permission

View File

@@ -0,0 +1,44 @@
- args:
role: user
table:
name: vendors
schema: public
type: drop_select_permission
- args:
permission:
allow_aggregations: false
columns:
- bodyshopid
- city
- cost_center
- country
- created_at
- discount
- display_name
- due_date
- email
- id
- name
- prompt_discount
- state
- street1
- street2
- taxid
- terms
- updated_at
- zip
computed_fields: []
filter:
bodyshop:
associations:
_and:
- user:
authid:
_eq: X-Hasura-User-Id
- active:
_eq: true
role: user
table:
name: vendors
schema: public
type: create_select_permission

View File

@@ -0,0 +1,47 @@
- args:
role: user
table:
name: vendors
schema: public
type: drop_update_permission
- args:
permission:
columns:
- favorite
- due_date
- discount
- prompt_discount
- city
- cost_center
- country
- display_name
- email
- name
- state
- street1
- street2
- taxid
- terms
- zip
- created_at
- updated_at
- bodyshopid
- id
filter:
bodyshop:
associations:
_and:
- user:
authid:
_eq: X-Hasura-User-Id
- active:
_eq: true
localPresets:
- key: ""
value: ""
set: {}
role: user
table:
name: vendors
schema: public
type: create_update_permission

View File

@@ -0,0 +1,46 @@
- args:
role: user
table:
name: vendors
schema: public
type: drop_update_permission
- args:
permission:
columns:
- bodyshopid
- city
- cost_center
- country
- created_at
- discount
- display_name
- due_date
- email
- id
- name
- prompt_discount
- state
- street1
- street2
- taxid
- terms
- updated_at
- zip
filter:
bodyshop:
associations:
_and:
- user:
authid:
_eq: X-Hasura-User-Id
- active:
_eq: true
localPresets:
- key: ""
value: ""
set: {}
role: user
table:
name: vendors
schema: public
type: create_update_permission

View File

@@ -0,0 +1,9 @@
- args:
sql: ALTER TABLE "public"."vendors" ADD COLUMN "favorite" bool
type: run_sql
- args:
sql: ALTER TABLE "public"."vendors" ALTER COLUMN "favorite" DROP NOT NULL
type: run_sql
- args:
sql: ALTER TABLE "public"."vendors" ALTER COLUMN "favorite" SET DEFAULT false
type: run_sql

View File

@@ -0,0 +1,3 @@
- args:
sql: ALTER TABLE "public"."vendors" DROP COLUMN "favorite" CASCADE
type: run_sql

View File

@@ -0,0 +1,3 @@
- args:
sql: ALTER TABLE "public"."vendors" DROP COLUMN "favorite";
type: run_sql

View File

@@ -0,0 +1,3 @@
- args:
sql: ALTER TABLE "public"."vendors" ADD COLUMN "favorite" jsonb NULL;
type: run_sql

View File

@@ -0,0 +1,46 @@
- args:
role: user
table:
name: vendors
schema: public
type: drop_insert_permission
- args:
permission:
check:
bodyshop:
associations:
_and:
- user:
authid:
_eq: X-Hasura-User-Id
- active:
_eq: true
columns:
- bodyshopid
- city
- cost_center
- country
- created_at
- discount
- display_name
- due_date
- email
- id
- name
- prompt_discount
- state
- street1
- street2
- taxid
- terms
- updated_at
- zip
localPresets:
- key: ""
value: ""
set: {}
role: user
table:
name: vendors
schema: public
type: create_insert_permission

View File

@@ -0,0 +1,47 @@
- args:
role: user
table:
name: vendors
schema: public
type: drop_insert_permission
- args:
permission:
check:
bodyshop:
associations:
_and:
- user:
authid:
_eq: X-Hasura-User-Id
- active:
_eq: true
columns:
- due_date
- favorite
- discount
- prompt_discount
- city
- cost_center
- country
- display_name
- email
- name
- state
- street1
- street2
- taxid
- terms
- zip
- created_at
- updated_at
- bodyshopid
- id
localPresets:
- key: ""
value: ""
set: {}
role: user
table:
name: vendors
schema: public
type: create_insert_permission

View File

@@ -0,0 +1,44 @@
- args:
role: user
table:
name: vendors
schema: public
type: drop_select_permission
- args:
permission:
allow_aggregations: false
columns:
- bodyshopid
- city
- cost_center
- country
- created_at
- discount
- display_name
- due_date
- email
- id
- name
- prompt_discount
- state
- street1
- street2
- taxid
- terms
- updated_at
- zip
computed_fields: []
filter:
bodyshop:
associations:
_and:
- user:
authid:
_eq: X-Hasura-User-Id
- active:
_eq: true
role: user
table:
name: vendors
schema: public
type: create_select_permission

View File

@@ -0,0 +1,45 @@
- args:
role: user
table:
name: vendors
schema: public
type: drop_select_permission
- args:
permission:
allow_aggregations: false
columns:
- due_date
- favorite
- discount
- prompt_discount
- city
- cost_center
- country
- display_name
- email
- name
- state
- street1
- street2
- taxid
- terms
- zip
- 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: vendors
schema: public
type: create_select_permission

View File

@@ -0,0 +1,46 @@
- args:
role: user
table:
name: vendors
schema: public
type: drop_update_permission
- args:
permission:
columns:
- bodyshopid
- city
- cost_center
- country
- created_at
- discount
- display_name
- due_date
- email
- id
- name
- prompt_discount
- state
- street1
- street2
- taxid
- terms
- updated_at
- zip
filter:
bodyshop:
associations:
_and:
- user:
authid:
_eq: X-Hasura-User-Id
- active:
_eq: true
localPresets:
- key: ""
value: ""
set: {}
role: user
table:
name: vendors
schema: public
type: create_update_permission

View File

@@ -0,0 +1,47 @@
- args:
role: user
table:
name: vendors
schema: public
type: drop_update_permission
- args:
permission:
columns:
- due_date
- favorite
- discount
- prompt_discount
- city
- cost_center
- country
- display_name
- email
- name
- state
- street1
- street2
- taxid
- terms
- zip
- created_at
- updated_at
- bodyshopid
- id
filter:
bodyshop:
associations:
_and:
- user:
authid:
_eq: X-Hasura-User-Id
- active:
_eq: true
localPresets:
- key: ""
value: ""
set: {}
role: user
table:
name: vendors
schema: public
type: create_update_permission

View File

@@ -0,0 +1,46 @@
- args:
role: user
table:
name: vendors
schema: public
type: drop_insert_permission
- args:
permission:
check:
bodyshop:
associations:
_and:
- user:
authid:
_eq: X-Hasura-User-Id
- active:
_eq: true
columns:
- bodyshopid
- city
- cost_center
- country
- created_at
- discount
- display_name
- due_date
- email
- id
- name
- prompt_discount
- state
- street1
- street2
- taxid
- terms
- updated_at
- zip
localPresets:
- key: ""
value: ""
set: {}
role: user
table:
name: vendors
schema: public
type: create_insert_permission

View File

@@ -0,0 +1,47 @@
- args:
role: user
table:
name: vendors
schema: public
type: drop_insert_permission
- args:
permission:
check:
bodyshop:
associations:
_and:
- user:
authid:
_eq: X-Hasura-User-Id
- active:
_eq: true
columns:
- due_date
- favorite
- discount
- prompt_discount
- city
- cost_center
- country
- display_name
- email
- name
- state
- street1
- street2
- taxid
- terms
- zip
- created_at
- updated_at
- bodyshopid
- id
localPresets:
- key: ""
value: ""
set: {}
role: user
table:
name: vendors
schema: public
type: create_insert_permission

View File

@@ -0,0 +1,44 @@
- args:
role: user
table:
name: vendors
schema: public
type: drop_select_permission
- args:
permission:
allow_aggregations: false
columns:
- bodyshopid
- city
- cost_center
- country
- created_at
- discount
- display_name
- due_date
- email
- id
- name
- prompt_discount
- state
- street1
- street2
- taxid
- terms
- updated_at
- zip
computed_fields: []
filter:
bodyshop:
associations:
_and:
- user:
authid:
_eq: X-Hasura-User-Id
- active:
_eq: true
role: user
table:
name: vendors
schema: public
type: create_select_permission

View File

@@ -0,0 +1,45 @@
- args:
role: user
table:
name: vendors
schema: public
type: drop_select_permission
- args:
permission:
allow_aggregations: false
columns:
- due_date
- favorite
- discount
- prompt_discount
- city
- cost_center
- country
- display_name
- email
- name
- state
- street1
- street2
- taxid
- terms
- zip
- 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: vendors
schema: public
type: create_select_permission

View File

@@ -0,0 +1,46 @@
- args:
role: user
table:
name: vendors
schema: public
type: drop_update_permission
- args:
permission:
columns:
- bodyshopid
- city
- cost_center
- country
- created_at
- discount
- display_name
- due_date
- email
- id
- name
- prompt_discount
- state
- street1
- street2
- taxid
- terms
- updated_at
- zip
filter:
bodyshop:
associations:
_and:
- user:
authid:
_eq: X-Hasura-User-Id
- active:
_eq: true
localPresets:
- key: ""
value: ""
set: {}
role: user
table:
name: vendors
schema: public
type: create_update_permission

View File

@@ -0,0 +1,47 @@
- args:
role: user
table:
name: vendors
schema: public
type: drop_update_permission
- args:
permission:
columns:
- due_date
- favorite
- discount
- prompt_discount
- city
- cost_center
- country
- display_name
- email
- name
- state
- street1
- street2
- taxid
- terms
- zip
- created_at
- updated_at
- bodyshopid
- id
filter:
bodyshop:
associations:
_and:
- user:
authid:
_eq: X-Hasura-User-Id
- active:
_eq: true
localPresets:
- key: ""
value: ""
set: {}
role: user
table:
name: vendors
schema: public
type: create_update_permission