Jobs, Vehicles, Owners database migrations.
This commit is contained in:
@@ -1 +1,2 @@
|
||||
REACT_APP_GRAPHQL_ENDPOINT=https://bodyshop-dev-db.herokuapp.com/v1/graphql
|
||||
REACT_APP_GA_CODE=217352234
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
- args:
|
||||
sql: ALTER TABLE "public"."associations" DROP COLUMN "active";
|
||||
type: run_sql
|
||||
@@ -0,0 +1,4 @@
|
||||
- args:
|
||||
sql: ALTER TABLE "public"."associations" ADD COLUMN "active" boolean NOT NULL
|
||||
DEFAULT true;
|
||||
type: run_sql
|
||||
@@ -0,0 +1,3 @@
|
||||
- args:
|
||||
sql: ALTER TABLE "public"."bodyshops" DROP COLUMN "created_at";
|
||||
type: run_sql
|
||||
@@ -0,0 +1,4 @@
|
||||
- args:
|
||||
sql: ALTER TABLE "public"."bodyshops" ADD COLUMN "created_at" timestamptz NULL
|
||||
DEFAULT now();
|
||||
type: run_sql
|
||||
@@ -0,0 +1,5 @@
|
||||
- args:
|
||||
sql: |-
|
||||
DROP TRIGGER IF EXISTS "set_public_bodyshops_updated_at" ON "public"."bodyshops";
|
||||
ALTER TABLE "public"."bodyshops" DROP COLUMN "updated_at";
|
||||
type: run_sql
|
||||
@@ -0,0 +1,9 @@
|
||||
- args:
|
||||
sql: "ALTER TABLE \"public\".\"bodyshops\" ADD COLUMN \"updated_at\" timestamptz
|
||||
NULL DEFAULT now();\n\nCREATE OR REPLACE FUNCTION \"public\".\"set_current_timestamp_updated_at\"()\nRETURNS
|
||||
TRIGGER AS $$\nDECLARE\n _new record;\nBEGIN\n _new := NEW;\n _new.\"updated_at\"
|
||||
= NOW();\n RETURN _new;\nEND;\n$$ LANGUAGE plpgsql;\nCREATE TRIGGER \"set_public_bodyshops_updated_at\"\nBEFORE
|
||||
UPDATE ON \"public\".\"bodyshops\"\nFOR EACH ROW\nEXECUTE PROCEDURE \"public\".\"set_current_timestamp_updated_at\"();\nCOMMENT
|
||||
ON TRIGGER \"set_public_bodyshops_updated_at\" ON \"public\".\"bodyshops\" \nIS
|
||||
'trigger to set value of column \"updated_at\" to current timestamp on row update';\n"
|
||||
type: run_sql
|
||||
@@ -0,0 +1,3 @@
|
||||
- args:
|
||||
sql: ALTER TABLE "public"."bodyshops" DROP COLUMN "address1";
|
||||
type: run_sql
|
||||
@@ -0,0 +1,3 @@
|
||||
- args:
|
||||
sql: ALTER TABLE "public"."bodyshops" ADD COLUMN "address1" text NULL;
|
||||
type: run_sql
|
||||
@@ -0,0 +1,3 @@
|
||||
- args:
|
||||
sql: ALTER TABLE "public"."bodyshops" DROP COLUMN "address2";
|
||||
type: run_sql
|
||||
@@ -0,0 +1,3 @@
|
||||
- args:
|
||||
sql: ALTER TABLE "public"."bodyshops" ADD COLUMN "address2" text NULL;
|
||||
type: run_sql
|
||||
@@ -0,0 +1,3 @@
|
||||
- args:
|
||||
sql: ALTER TABLE "public"."bodyshops" DROP COLUMN "city";
|
||||
type: run_sql
|
||||
@@ -0,0 +1,3 @@
|
||||
- args:
|
||||
sql: ALTER TABLE "public"."bodyshops" ADD COLUMN "city" text NULL;
|
||||
type: run_sql
|
||||
@@ -0,0 +1,3 @@
|
||||
- args:
|
||||
sql: ALTER TABLE "public"."bodyshops" DROP COLUMN "state";
|
||||
type: run_sql
|
||||
@@ -0,0 +1,3 @@
|
||||
- args:
|
||||
sql: ALTER TABLE "public"."bodyshops" ADD COLUMN "state" text NULL;
|
||||
type: run_sql
|
||||
@@ -0,0 +1,3 @@
|
||||
- args:
|
||||
sql: ALTER TABLE "public"."bodyshops" DROP COLUMN "zip_post";
|
||||
type: run_sql
|
||||
@@ -0,0 +1,3 @@
|
||||
- args:
|
||||
sql: ALTER TABLE "public"."bodyshops" ADD COLUMN "zip_post" text NULL;
|
||||
type: run_sql
|
||||
@@ -0,0 +1,3 @@
|
||||
- args:
|
||||
sql: ALTER TABLE "public"."bodyshops" DROP COLUMN "country";
|
||||
type: run_sql
|
||||
@@ -0,0 +1,3 @@
|
||||
- args:
|
||||
sql: ALTER TABLE "public"."bodyshops" ADD COLUMN "country" text NULL;
|
||||
type: run_sql
|
||||
@@ -0,0 +1,29 @@
|
||||
- args:
|
||||
role: user
|
||||
table:
|
||||
name: jobs
|
||||
schema: public
|
||||
type: drop_insert_permission
|
||||
- args:
|
||||
permission:
|
||||
check:
|
||||
bodyshop:
|
||||
associations:
|
||||
user:
|
||||
authid:
|
||||
_eq: X-Hasura-User-Id
|
||||
columns:
|
||||
- id
|
||||
- created_at
|
||||
- updated_at
|
||||
- shopid
|
||||
- est_number
|
||||
localPresets:
|
||||
- key: ""
|
||||
value: ""
|
||||
set: {}
|
||||
role: user
|
||||
table:
|
||||
name: jobs
|
||||
schema: public
|
||||
type: create_insert_permission
|
||||
@@ -0,0 +1,34 @@
|
||||
- args:
|
||||
role: user
|
||||
table:
|
||||
name: jobs
|
||||
schema: public
|
||||
type: drop_insert_permission
|
||||
- args:
|
||||
permission:
|
||||
check:
|
||||
_and:
|
||||
- bodyshop:
|
||||
associations:
|
||||
user:
|
||||
authid:
|
||||
_eq: X-Hasura-User-Id
|
||||
- bodyshop:
|
||||
associations:
|
||||
active:
|
||||
_eq: true
|
||||
columns:
|
||||
- id
|
||||
- created_at
|
||||
- updated_at
|
||||
- shopid
|
||||
- est_number
|
||||
localPresets:
|
||||
- key: ""
|
||||
value: ""
|
||||
set: {}
|
||||
role: user
|
||||
table:
|
||||
name: jobs
|
||||
schema: public
|
||||
type: create_insert_permission
|
||||
@@ -0,0 +1,27 @@
|
||||
- args:
|
||||
role: user
|
||||
table:
|
||||
name: jobs
|
||||
schema: public
|
||||
type: drop_select_permission
|
||||
- args:
|
||||
permission:
|
||||
allow_aggregations: false
|
||||
columns:
|
||||
- est_number
|
||||
- created_at
|
||||
- updated_at
|
||||
- id
|
||||
- shopid
|
||||
computed_fields: []
|
||||
filter:
|
||||
bodyshop:
|
||||
associations:
|
||||
user:
|
||||
authid:
|
||||
_eq: X-Hasura-User-Id
|
||||
role: user
|
||||
table:
|
||||
name: jobs
|
||||
schema: public
|
||||
type: create_select_permission
|
||||
@@ -0,0 +1,32 @@
|
||||
- args:
|
||||
role: user
|
||||
table:
|
||||
name: jobs
|
||||
schema: public
|
||||
type: drop_select_permission
|
||||
- args:
|
||||
permission:
|
||||
allow_aggregations: false
|
||||
columns:
|
||||
- est_number
|
||||
- created_at
|
||||
- updated_at
|
||||
- id
|
||||
- shopid
|
||||
computed_fields: []
|
||||
filter:
|
||||
_and:
|
||||
- bodyshop:
|
||||
associations:
|
||||
user:
|
||||
authid:
|
||||
_eq: X-Hasura-User-Id
|
||||
- bodyshop:
|
||||
associations:
|
||||
active:
|
||||
_eq: true
|
||||
role: user
|
||||
table:
|
||||
name: jobs
|
||||
schema: public
|
||||
type: create_select_permission
|
||||
@@ -0,0 +1,29 @@
|
||||
- args:
|
||||
role: user
|
||||
table:
|
||||
name: jobs
|
||||
schema: public
|
||||
type: drop_update_permission
|
||||
- args:
|
||||
permission:
|
||||
columns:
|
||||
- est_number
|
||||
- created_at
|
||||
- updated_at
|
||||
- id
|
||||
- shopid
|
||||
filter:
|
||||
bodyshop:
|
||||
associations:
|
||||
user:
|
||||
authid:
|
||||
_eq: X-Hasura-User-Id
|
||||
localPresets:
|
||||
- key: ""
|
||||
value: ""
|
||||
set: {}
|
||||
role: user
|
||||
table:
|
||||
name: jobs
|
||||
schema: public
|
||||
type: create_update_permission
|
||||
@@ -0,0 +1,34 @@
|
||||
- args:
|
||||
role: user
|
||||
table:
|
||||
name: jobs
|
||||
schema: public
|
||||
type: drop_update_permission
|
||||
- args:
|
||||
permission:
|
||||
columns:
|
||||
- est_number
|
||||
- created_at
|
||||
- updated_at
|
||||
- id
|
||||
- shopid
|
||||
filter:
|
||||
_and:
|
||||
- bodyshop:
|
||||
associations:
|
||||
user:
|
||||
authid:
|
||||
_eq: X-Hasura-User-Id
|
||||
- bodyshop:
|
||||
associations:
|
||||
active:
|
||||
_eq: true
|
||||
localPresets:
|
||||
- key: ""
|
||||
value: ""
|
||||
set: {}
|
||||
role: user
|
||||
table:
|
||||
name: jobs
|
||||
schema: public
|
||||
type: create_update_permission
|
||||
@@ -0,0 +1,19 @@
|
||||
- args:
|
||||
role: user
|
||||
table:
|
||||
name: jobs
|
||||
schema: public
|
||||
type: drop_delete_permission
|
||||
- args:
|
||||
permission:
|
||||
filter:
|
||||
bodyshop:
|
||||
associations:
|
||||
user:
|
||||
authid:
|
||||
_eq: X-Hasura-User-Id
|
||||
role: user
|
||||
table:
|
||||
name: jobs
|
||||
schema: public
|
||||
type: create_delete_permission
|
||||
@@ -0,0 +1,24 @@
|
||||
- args:
|
||||
role: user
|
||||
table:
|
||||
name: jobs
|
||||
schema: public
|
||||
type: drop_delete_permission
|
||||
- args:
|
||||
permission:
|
||||
filter:
|
||||
_and:
|
||||
- bodyshop:
|
||||
associations:
|
||||
user:
|
||||
authid:
|
||||
_eq: X-Hasura-User-Id
|
||||
- bodyshop:
|
||||
associations:
|
||||
active:
|
||||
_eq: true
|
||||
role: user
|
||||
table:
|
||||
name: jobs
|
||||
schema: public
|
||||
type: create_delete_permission
|
||||
@@ -0,0 +1,3 @@
|
||||
- args:
|
||||
sql: ALTER TABLE "public"."jobs" DROP COLUMN "ro_number";
|
||||
type: run_sql
|
||||
@@ -0,0 +1,3 @@
|
||||
- args:
|
||||
sql: ALTER TABLE "public"."jobs" ADD COLUMN "ro_number" text NULL;
|
||||
type: run_sql
|
||||
@@ -0,0 +1,3 @@
|
||||
- args:
|
||||
sql: ALTER TABLE "public"."bodyshops" DROP COLUMN "email";
|
||||
type: run_sql
|
||||
@@ -0,0 +1,3 @@
|
||||
- args:
|
||||
sql: ALTER TABLE "public"."bodyshops" ADD COLUMN "email" text NULL;
|
||||
type: run_sql
|
||||
@@ -0,0 +1,3 @@
|
||||
- args:
|
||||
sql: ALTER TABLE "public"."bodyshops" DROP COLUMN "tax_id";
|
||||
type: run_sql
|
||||
@@ -0,0 +1,3 @@
|
||||
- args:
|
||||
sql: ALTER TABLE "public"."bodyshops" ADD COLUMN "tax_id" text NULL;
|
||||
type: run_sql
|
||||
@@ -0,0 +1,3 @@
|
||||
- args:
|
||||
sql: ALTER TABLE "public"."bodyshops" DROP COLUMN "insurance_vendor_id";
|
||||
type: run_sql
|
||||
@@ -0,0 +1,3 @@
|
||||
- args:
|
||||
sql: ALTER TABLE "public"."bodyshops" ADD COLUMN "insurance_vendor_id" text NULL;
|
||||
type: run_sql
|
||||
@@ -0,0 +1,6 @@
|
||||
- args:
|
||||
sql: COMMENT ON COLUMN "public"."bodyshops"."tax_id" IS E'null'
|
||||
type: run_sql
|
||||
- args:
|
||||
sql: alter table "public"."bodyshops" rename column "federal_tax_id" to "tax_id";
|
||||
type: run_sql
|
||||
@@ -0,0 +1,6 @@
|
||||
- args:
|
||||
sql: COMMENT ON COLUMN "public"."bodyshops"."tax_id" IS E''
|
||||
type: run_sql
|
||||
- args:
|
||||
sql: alter table "public"."bodyshops" rename column "tax_id" to "federal_tax_id";
|
||||
type: run_sql
|
||||
@@ -0,0 +1,3 @@
|
||||
- args:
|
||||
sql: ALTER TABLE "public"."bodyshops" DROP COLUMN "state_tax_id";
|
||||
type: run_sql
|
||||
@@ -0,0 +1,3 @@
|
||||
- args:
|
||||
sql: ALTER TABLE "public"."bodyshops" ADD COLUMN "state_tax_id" text NULL;
|
||||
type: run_sql
|
||||
@@ -0,0 +1,3 @@
|
||||
- args:
|
||||
sql: ALTER TABLE "public"."bodyshops" DROP COLUMN "logo_img_path";
|
||||
type: run_sql
|
||||
@@ -0,0 +1,3 @@
|
||||
- args:
|
||||
sql: ALTER TABLE "public"."bodyshops" ADD COLUMN "logo_img_path" text NULL;
|
||||
type: run_sql
|
||||
@@ -0,0 +1,3 @@
|
||||
- args:
|
||||
sql: DROP TABLE "public"."vehicles"
|
||||
type: run_sql
|
||||
@@ -0,0 +1,22 @@
|
||||
- args:
|
||||
sql: CREATE EXTENSION IF NOT EXISTS pgcrypto;
|
||||
type: run_sql
|
||||
- args:
|
||||
sql: "CREATE TABLE \"public\".\"vehicles\"(\"id\" uuid NOT NULL DEFAULT gen_random_uuid(),
|
||||
\"created_at\" timestamptz NOT NULL DEFAULT now(), \"updated_at\" timestamptz
|
||||
NOT NULL DEFAULT now(), \"v_vin\" text NOT NULL, \"v_make_desc\" text, \"v_model_desc\"
|
||||
text, \"v_model_yr\" text, \"v_color\" text, \"v_paint_codes\" jsonb, \"v_bstyle\"
|
||||
text, \"v_engine\" text, \"plate_no\" text, \"shopid\" uuid NOT NULL, PRIMARY
|
||||
KEY (\"id\") , FOREIGN KEY (\"shopid\") REFERENCES \"public\".\"bodyshops\"(\"id\")
|
||||
ON UPDATE restrict ON DELETE cascade, UNIQUE (\"v_vin\", \"shopid\"));\nCREATE
|
||||
OR REPLACE FUNCTION \"public\".\"set_current_timestamp_updated_at\"()\nRETURNS
|
||||
TRIGGER AS $$\nDECLARE\n _new record;\nBEGIN\n _new := NEW;\n _new.\"updated_at\"
|
||||
= NOW();\n RETURN _new;\nEND;\n$$ LANGUAGE plpgsql;\nCREATE TRIGGER \"set_public_vehicles_updated_at\"\nBEFORE
|
||||
UPDATE ON \"public\".\"vehicles\"\nFOR EACH ROW\nEXECUTE PROCEDURE \"public\".\"set_current_timestamp_updated_at\"();\nCOMMENT
|
||||
ON TRIGGER \"set_public_vehicles_updated_at\" ON \"public\".\"vehicles\" \nIS
|
||||
'trigger to set value of column \"updated_at\" to current timestamp on row update';\n"
|
||||
type: run_sql
|
||||
- args:
|
||||
name: vehicles
|
||||
schema: public
|
||||
type: add_existing_table_or_view
|
||||
@@ -0,0 +1,6 @@
|
||||
- args:
|
||||
relationship: bodyshop
|
||||
table:
|
||||
name: vehicles
|
||||
schema: public
|
||||
type: drop_relationship
|
||||
@@ -0,0 +1,8 @@
|
||||
- args:
|
||||
name: bodyshop
|
||||
table:
|
||||
name: vehicles
|
||||
schema: public
|
||||
using:
|
||||
foreign_key_constraint_on: shopid
|
||||
type: create_object_relationship
|
||||
@@ -0,0 +1,6 @@
|
||||
- args:
|
||||
role: user
|
||||
table:
|
||||
name: vehicles
|
||||
schema: public
|
||||
type: drop_insert_permission
|
||||
@@ -0,0 +1,36 @@
|
||||
- args:
|
||||
permission:
|
||||
allow_upsert: true
|
||||
check:
|
||||
_and:
|
||||
- bodyshop:
|
||||
associations:
|
||||
user:
|
||||
authid:
|
||||
_eq: X-Hasura-User-Id
|
||||
- bodyshop:
|
||||
associations:
|
||||
active:
|
||||
_eq: true
|
||||
columns:
|
||||
- created_at
|
||||
- plate_no
|
||||
- shopid
|
||||
- updated_at
|
||||
- v_bstyle
|
||||
- v_color
|
||||
- v_engine
|
||||
- v_make_desc
|
||||
- v_model_desc
|
||||
- v_model_yr
|
||||
- v_paint_codes
|
||||
- v_vin
|
||||
localPresets:
|
||||
- key: ""
|
||||
value: ""
|
||||
set: {}
|
||||
role: user
|
||||
table:
|
||||
name: vehicles
|
||||
schema: public
|
||||
type: create_insert_permission
|
||||
@@ -0,0 +1,6 @@
|
||||
- args:
|
||||
role: user
|
||||
table:
|
||||
name: vehicles
|
||||
schema: public
|
||||
type: drop_select_permission
|
||||
@@ -0,0 +1,34 @@
|
||||
- args:
|
||||
permission:
|
||||
allow_aggregations: false
|
||||
columns:
|
||||
- v_paint_codes
|
||||
- plate_no
|
||||
- v_bstyle
|
||||
- v_color
|
||||
- v_engine
|
||||
- v_make_desc
|
||||
- v_model_desc
|
||||
- v_model_yr
|
||||
- v_vin
|
||||
- created_at
|
||||
- updated_at
|
||||
- id
|
||||
- shopid
|
||||
filter:
|
||||
_and:
|
||||
- bodyshop:
|
||||
associations:
|
||||
user:
|
||||
authid:
|
||||
_eq: X-Hasura-User-Id
|
||||
- bodyshop:
|
||||
associations:
|
||||
active:
|
||||
_eq: true
|
||||
limit: null
|
||||
role: user
|
||||
table:
|
||||
name: vehicles
|
||||
schema: public
|
||||
type: create_select_permission
|
||||
@@ -0,0 +1,6 @@
|
||||
- args:
|
||||
role: user
|
||||
table:
|
||||
name: vehicles
|
||||
schema: public
|
||||
type: drop_update_permission
|
||||
@@ -0,0 +1,36 @@
|
||||
- args:
|
||||
permission:
|
||||
columns:
|
||||
- v_paint_codes
|
||||
- plate_no
|
||||
- v_bstyle
|
||||
- v_color
|
||||
- v_engine
|
||||
- v_make_desc
|
||||
- v_model_desc
|
||||
- v_model_yr
|
||||
- v_vin
|
||||
- created_at
|
||||
- updated_at
|
||||
- id
|
||||
- shopid
|
||||
filter:
|
||||
_and:
|
||||
- bodyshop:
|
||||
associations:
|
||||
user:
|
||||
authid:
|
||||
_eq: X-Hasura-User-Id
|
||||
- bodyshop:
|
||||
associations:
|
||||
active:
|
||||
_eq: true
|
||||
localPresets:
|
||||
- key: ""
|
||||
value: ""
|
||||
set: {}
|
||||
role: user
|
||||
table:
|
||||
name: vehicles
|
||||
schema: public
|
||||
type: create_update_permission
|
||||
@@ -0,0 +1,6 @@
|
||||
- args:
|
||||
role: user
|
||||
table:
|
||||
name: vehicles
|
||||
schema: public
|
||||
type: drop_delete_permission
|
||||
@@ -0,0 +1,18 @@
|
||||
- args:
|
||||
permission:
|
||||
filter:
|
||||
_and:
|
||||
- bodyshop:
|
||||
associations:
|
||||
user:
|
||||
authid:
|
||||
_eq: X-Hasura-User-Id
|
||||
- bodyshop:
|
||||
associations:
|
||||
active:
|
||||
_eq: true
|
||||
role: user
|
||||
table:
|
||||
name: vehicles
|
||||
schema: public
|
||||
type: create_delete_permission
|
||||
@@ -0,0 +1,3 @@
|
||||
- args:
|
||||
sql: DROP TABLE "public"."owners"
|
||||
type: run_sql
|
||||
@@ -0,0 +1,22 @@
|
||||
- args:
|
||||
sql: CREATE EXTENSION IF NOT EXISTS pgcrypto;
|
||||
type: run_sql
|
||||
- args:
|
||||
sql: "CREATE TABLE \"public\".\"owners\"(\"id\" uuid NOT NULL DEFAULT gen_random_uuid(),
|
||||
\"created_at\" timestamptz NOT NULL DEFAULT now(), \"updated_at\" timestamptz
|
||||
NOT NULL DEFAULT now(), \"first_name\" text, \"last_name\" text, \"address1\"
|
||||
text, \"address2\" text, \"city\" text, \"state\" text, \"zip\" text, \"country\"
|
||||
text, \"email\" text, \"phone\" text, \"preferred_contact\" text, \"allow_text_message\"
|
||||
boolean NOT NULL DEFAULT false, \"shopid\" uuid NOT NULL, PRIMARY KEY (\"id\")
|
||||
, FOREIGN KEY (\"shopid\") REFERENCES \"public\".\"bodyshops\"(\"id\") ON UPDATE
|
||||
restrict ON DELETE cascade);\nCREATE OR REPLACE FUNCTION \"public\".\"set_current_timestamp_updated_at\"()\nRETURNS
|
||||
TRIGGER AS $$\nDECLARE\n _new record;\nBEGIN\n _new := NEW;\n _new.\"updated_at\"
|
||||
= NOW();\n RETURN _new;\nEND;\n$$ LANGUAGE plpgsql;\nCREATE TRIGGER \"set_public_owners_updated_at\"\nBEFORE
|
||||
UPDATE ON \"public\".\"owners\"\nFOR EACH ROW\nEXECUTE PROCEDURE \"public\".\"set_current_timestamp_updated_at\"();\nCOMMENT
|
||||
ON TRIGGER \"set_public_owners_updated_at\" ON \"public\".\"owners\" \nIS 'trigger
|
||||
to set value of column \"updated_at\" to current timestamp on row update';\n"
|
||||
type: run_sql
|
||||
- args:
|
||||
name: owners
|
||||
schema: public
|
||||
type: add_existing_table_or_view
|
||||
@@ -0,0 +1,6 @@
|
||||
- args:
|
||||
relationship: bodyshop
|
||||
table:
|
||||
name: owners
|
||||
schema: public
|
||||
type: drop_relationship
|
||||
@@ -0,0 +1,8 @@
|
||||
- args:
|
||||
name: bodyshop
|
||||
table:
|
||||
name: owners
|
||||
schema: public
|
||||
using:
|
||||
foreign_key_constraint_on: shopid
|
||||
type: create_object_relationship
|
||||
@@ -0,0 +1,6 @@
|
||||
- args:
|
||||
role: user
|
||||
table:
|
||||
name: owners
|
||||
schema: public
|
||||
type: drop_insert_permission
|
||||
@@ -0,0 +1,39 @@
|
||||
- args:
|
||||
permission:
|
||||
allow_upsert: true
|
||||
check:
|
||||
_and:
|
||||
- bodyshop:
|
||||
associations:
|
||||
user:
|
||||
authid:
|
||||
_eq: X-Hasura-User-Id
|
||||
- bodyshop:
|
||||
associations:
|
||||
active:
|
||||
_eq: true
|
||||
columns:
|
||||
- address1
|
||||
- address2
|
||||
- allow_text_message
|
||||
- city
|
||||
- country
|
||||
- created_at
|
||||
- email
|
||||
- first_name
|
||||
- last_name
|
||||
- phone
|
||||
- preferred_contact
|
||||
- shopid
|
||||
- state
|
||||
- updated_at
|
||||
- zip
|
||||
localPresets:
|
||||
- key: ""
|
||||
value: ""
|
||||
set: {}
|
||||
role: user
|
||||
table:
|
||||
name: owners
|
||||
schema: public
|
||||
type: create_insert_permission
|
||||
@@ -0,0 +1,6 @@
|
||||
- args:
|
||||
role: user
|
||||
table:
|
||||
name: owners
|
||||
schema: public
|
||||
type: drop_select_permission
|
||||
@@ -0,0 +1,37 @@
|
||||
- args:
|
||||
permission:
|
||||
allow_aggregations: false
|
||||
columns:
|
||||
- allow_text_message
|
||||
- address1
|
||||
- address2
|
||||
- city
|
||||
- country
|
||||
- email
|
||||
- first_name
|
||||
- last_name
|
||||
- phone
|
||||
- preferred_contact
|
||||
- state
|
||||
- zip
|
||||
- created_at
|
||||
- updated_at
|
||||
- id
|
||||
- shopid
|
||||
filter:
|
||||
_and:
|
||||
- bodyshop:
|
||||
associations:
|
||||
user:
|
||||
authid:
|
||||
_eq: X-Hasura-User-Id
|
||||
- bodyshop:
|
||||
associations:
|
||||
active:
|
||||
_eq: true
|
||||
limit: null
|
||||
role: user
|
||||
table:
|
||||
name: owners
|
||||
schema: public
|
||||
type: create_select_permission
|
||||
@@ -0,0 +1,6 @@
|
||||
- args:
|
||||
role: user
|
||||
table:
|
||||
name: owners
|
||||
schema: public
|
||||
type: drop_update_permission
|
||||
@@ -0,0 +1,39 @@
|
||||
- args:
|
||||
permission:
|
||||
columns:
|
||||
- allow_text_message
|
||||
- address1
|
||||
- address2
|
||||
- city
|
||||
- country
|
||||
- email
|
||||
- first_name
|
||||
- last_name
|
||||
- phone
|
||||
- preferred_contact
|
||||
- state
|
||||
- zip
|
||||
- created_at
|
||||
- updated_at
|
||||
- id
|
||||
- shopid
|
||||
filter:
|
||||
_and:
|
||||
- bodyshop:
|
||||
associations:
|
||||
user:
|
||||
authid:
|
||||
_eq: X-Hasura-User-Id
|
||||
- bodyshop:
|
||||
associations:
|
||||
active:
|
||||
_eq: true
|
||||
localPresets:
|
||||
- key: ""
|
||||
value: ""
|
||||
set: {}
|
||||
role: user
|
||||
table:
|
||||
name: owners
|
||||
schema: public
|
||||
type: create_update_permission
|
||||
@@ -0,0 +1,45 @@
|
||||
- args:
|
||||
role: user
|
||||
table:
|
||||
name: owners
|
||||
schema: public
|
||||
type: drop_update_permission
|
||||
- args:
|
||||
permission:
|
||||
columns:
|
||||
- allow_text_message
|
||||
- address1
|
||||
- address2
|
||||
- city
|
||||
- country
|
||||
- email
|
||||
- first_name
|
||||
- last_name
|
||||
- phone
|
||||
- preferred_contact
|
||||
- state
|
||||
- zip
|
||||
- created_at
|
||||
- updated_at
|
||||
- id
|
||||
- shopid
|
||||
filter:
|
||||
_and:
|
||||
- bodyshop:
|
||||
associations:
|
||||
user:
|
||||
authid:
|
||||
_eq: X-Hasura-User-Id
|
||||
- bodyshop:
|
||||
associations:
|
||||
active:
|
||||
_eq: true
|
||||
localPresets:
|
||||
- key: ""
|
||||
value: ""
|
||||
set: {}
|
||||
role: user
|
||||
table:
|
||||
name: owners
|
||||
schema: public
|
||||
type: create_update_permission
|
||||
@@ -0,0 +1,44 @@
|
||||
- args:
|
||||
role: user
|
||||
table:
|
||||
name: owners
|
||||
schema: public
|
||||
type: drop_update_permission
|
||||
- args:
|
||||
permission:
|
||||
columns:
|
||||
- address1
|
||||
- address2
|
||||
- allow_text_message
|
||||
- city
|
||||
- country
|
||||
- created_at
|
||||
- email
|
||||
- first_name
|
||||
- last_name
|
||||
- phone
|
||||
- preferred_contact
|
||||
- shopid
|
||||
- state
|
||||
- updated_at
|
||||
- zip
|
||||
filter:
|
||||
_and:
|
||||
- bodyshop:
|
||||
associations:
|
||||
user:
|
||||
authid:
|
||||
_eq: X-Hasura-User-Id
|
||||
- bodyshop:
|
||||
associations:
|
||||
active:
|
||||
_eq: true
|
||||
localPresets:
|
||||
- key: ""
|
||||
value: ""
|
||||
set: {}
|
||||
role: user
|
||||
table:
|
||||
name: owners
|
||||
schema: public
|
||||
type: create_update_permission
|
||||
@@ -0,0 +1,6 @@
|
||||
- args:
|
||||
role: user
|
||||
table:
|
||||
name: owners
|
||||
schema: public
|
||||
type: drop_delete_permission
|
||||
@@ -0,0 +1,18 @@
|
||||
- args:
|
||||
permission:
|
||||
filter:
|
||||
_and:
|
||||
- bodyshop:
|
||||
associations:
|
||||
user:
|
||||
authid:
|
||||
_eq: X-Hasura-User-Id
|
||||
- bodyshop:
|
||||
associations:
|
||||
active:
|
||||
_eq: true
|
||||
role: user
|
||||
table:
|
||||
name: owners
|
||||
schema: public
|
||||
type: create_delete_permission
|
||||
@@ -0,0 +1,42 @@
|
||||
- args:
|
||||
role: user
|
||||
table:
|
||||
name: vehicles
|
||||
schema: public
|
||||
type: drop_update_permission
|
||||
- args:
|
||||
permission:
|
||||
columns:
|
||||
- v_paint_codes
|
||||
- plate_no
|
||||
- v_bstyle
|
||||
- v_color
|
||||
- v_engine
|
||||
- v_make_desc
|
||||
- v_model_desc
|
||||
- v_model_yr
|
||||
- v_vin
|
||||
- created_at
|
||||
- updated_at
|
||||
- id
|
||||
- shopid
|
||||
filter:
|
||||
_and:
|
||||
- bodyshop:
|
||||
associations:
|
||||
user:
|
||||
authid:
|
||||
_eq: X-Hasura-User-Id
|
||||
- bodyshop:
|
||||
associations:
|
||||
active:
|
||||
_eq: true
|
||||
localPresets:
|
||||
- key: ""
|
||||
value: ""
|
||||
set: {}
|
||||
role: user
|
||||
table:
|
||||
name: vehicles
|
||||
schema: public
|
||||
type: create_update_permission
|
||||
@@ -0,0 +1,41 @@
|
||||
- args:
|
||||
role: user
|
||||
table:
|
||||
name: vehicles
|
||||
schema: public
|
||||
type: drop_update_permission
|
||||
- args:
|
||||
permission:
|
||||
columns:
|
||||
- created_at
|
||||
- plate_no
|
||||
- shopid
|
||||
- updated_at
|
||||
- v_bstyle
|
||||
- v_color
|
||||
- v_engine
|
||||
- v_make_desc
|
||||
- v_model_desc
|
||||
- v_model_yr
|
||||
- v_paint_codes
|
||||
- v_vin
|
||||
filter:
|
||||
_and:
|
||||
- bodyshop:
|
||||
associations:
|
||||
user:
|
||||
authid:
|
||||
_eq: X-Hasura-User-Id
|
||||
- bodyshop:
|
||||
associations:
|
||||
active:
|
||||
_eq: true
|
||||
localPresets:
|
||||
- key: ""
|
||||
value: ""
|
||||
set: {}
|
||||
role: user
|
||||
table:
|
||||
name: vehicles
|
||||
schema: public
|
||||
type: create_update_permission
|
||||
@@ -0,0 +1,6 @@
|
||||
- args:
|
||||
relationship: vehicles
|
||||
table:
|
||||
name: bodyshops
|
||||
schema: public
|
||||
type: drop_relationship
|
||||
@@ -0,0 +1,12 @@
|
||||
- args:
|
||||
name: vehicles
|
||||
table:
|
||||
name: bodyshops
|
||||
schema: public
|
||||
using:
|
||||
foreign_key_constraint_on:
|
||||
column: shopid
|
||||
table:
|
||||
name: vehicles
|
||||
schema: public
|
||||
type: create_array_relationship
|
||||
@@ -0,0 +1,6 @@
|
||||
- args:
|
||||
relationship: owners
|
||||
table:
|
||||
name: bodyshops
|
||||
schema: public
|
||||
type: drop_relationship
|
||||
@@ -0,0 +1,12 @@
|
||||
- args:
|
||||
name: owners
|
||||
table:
|
||||
name: bodyshops
|
||||
schema: public
|
||||
using:
|
||||
foreign_key_constraint_on:
|
||||
column: shopid
|
||||
table:
|
||||
name: owners
|
||||
schema: public
|
||||
type: create_array_relationship
|
||||
@@ -0,0 +1,3 @@
|
||||
- args:
|
||||
sql: ALTER TABLE "public"."jobs" DROP COLUMN "ownerid";
|
||||
type: run_sql
|
||||
@@ -0,0 +1,3 @@
|
||||
- args:
|
||||
sql: ALTER TABLE "public"."jobs" ADD COLUMN "ownerid" uuid NULL;
|
||||
type: run_sql
|
||||
@@ -0,0 +1,3 @@
|
||||
- args:
|
||||
sql: ALTER TABLE "public"."jobs" DROP COLUMN "vehicleid";
|
||||
type: run_sql
|
||||
@@ -0,0 +1,3 @@
|
||||
- args:
|
||||
sql: ALTER TABLE "public"."jobs" ADD COLUMN "vehicleid" uuid NULL;
|
||||
type: run_sql
|
||||
1
hasura/migrations/1576015434120_jobs_rates_1/down.yaml
Normal file
1
hasura/migrations/1576015434120_jobs_rates_1/down.yaml
Normal file
@@ -0,0 +1 @@
|
||||
[]
|
||||
15
hasura/migrations/1576015434120_jobs_rates_1/up.yaml
Normal file
15
hasura/migrations/1576015434120_jobs_rates_1/up.yaml
Normal file
@@ -0,0 +1,15 @@
|
||||
- args:
|
||||
cascade: true
|
||||
sql: "alter table public.jobs\r\nadd column labor_rate_id text,\r\nadd column
|
||||
labor_rate_desc text,\r\nadd column rate_lab numeric,\r\nadd column rate_lad
|
||||
numeric,\r\nadd column rate_lae numeric,\r\nadd column rate_lar numeric,\r\nadd
|
||||
column rate_las numeric,\r\nadd column rate_laf numeric,\r\nadd column rate_lam
|
||||
numeric,\r\nadd column rate_lag numeric,\r\nadd column rate_atp numeric,\r\nadd
|
||||
column rate_lau numeric,\r\nadd column rate_la1 numeric,\r\nadd column rate_la2
|
||||
numeric,\r\nadd column rate_la3 numeric,\r\nadd column rate_la4 numeric,\r\nadd
|
||||
column rate_mapa numeric,\r\nadd column rate_mash numeric,\r\nadd column rate_mahw
|
||||
numeric,\r\nadd column rate_ma2s numeric,\r\nadd column rate_ma3s numeric,\r\nadd
|
||||
column rate_ma2t numeric,\r\nadd column rate_mabl numeric,\r\nadd column rate_macs
|
||||
numeric,\r\nadd column rate_matd numeric,\r\nadd column federal_tax_rate numeric,\r\nadd
|
||||
column state_tax_rate numeric,\r\nadd column local_tax_rate numeric\r\n"
|
||||
type: run_sql
|
||||
1
hasura/migrations/1576016564351_jobs_data2/down.yaml
Normal file
1
hasura/migrations/1576016564351_jobs_data2/down.yaml
Normal file
@@ -0,0 +1 @@
|
||||
[]
|
||||
11
hasura/migrations/1576016564351_jobs_data2/up.yaml
Normal file
11
hasura/migrations/1576016564351_jobs_data2/up.yaml
Normal file
@@ -0,0 +1,11 @@
|
||||
- args:
|
||||
cascade: true
|
||||
sql: "alter table jobs\r\nadd column est_co_nm text,\r\nadd column est_addr1 text,\r\nadd
|
||||
column est_addr2 text,\r\nadd column est_city text,\r\nadd column est_st text,\r\nadd
|
||||
column est_zip text,\r\nadd column est_ctry text,\r\nadd column est_ph1 text,\r\nadd
|
||||
column est_ea text,\r\nadd column est_ct_ln text,\r\nadd column est_ct_fn text,\r\nadd
|
||||
column status text,\r\nadd column scheduled_in timestamp,\r\nadd column actual_in
|
||||
timestamp,\r\nadd column scheduled_completion timestamp,\r\nadd column actual_completion
|
||||
timestamp,\r\nadd column scheduled_delivery timestamp,\r\nadd column actual_delivery
|
||||
timestamp,\r\nadd column regie_number text,\r\nadd column invoice_date date"
|
||||
type: run_sql
|
||||
4945
package-lock.json
generated
Normal file
4945
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -22,7 +22,8 @@
|
||||
"dotenv": "7.0.0",
|
||||
"express": "^4.16.4",
|
||||
"express-sslify": "^1.2.0",
|
||||
"firebase-tools": "^7.9.0"
|
||||
"firebase-tools": "^7.9.0",
|
||||
"react-ga": "^2.7.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"concurrently": "^4.0.1",
|
||||
|
||||
@@ -3229,6 +3229,11 @@ rc@^1.0.1, rc@^1.1.6:
|
||||
minimist "^1.2.0"
|
||||
strip-json-comments "~2.0.1"
|
||||
|
||||
react-ga@^2.7.0:
|
||||
version "2.7.0"
|
||||
resolved "https://registry.yarnpkg.com/react-ga/-/react-ga-2.7.0.tgz#24328f157f31e8cffbf4de74a3396536679d8d7c"
|
||||
integrity sha512-AjC7UOZMvygrWTc2hKxTDvlMXEtbmA0IgJjmkhgmQQ3RkXrWR11xEagLGFGaNyaPnmg24oaIiaNPnEoftUhfXA==
|
||||
|
||||
read-pkg@^4.0.1:
|
||||
version "4.0.1"
|
||||
resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-4.0.1.tgz#963625378f3e1c4d48c85872b5a6ec7d5d093237"
|
||||
|
||||
Reference in New Issue
Block a user