From 45dd3d8cd685614648ed89d57bb1c3ce5eeed118 Mon Sep 17 00:00:00 2001 From: Dave Date: Tue, 30 Dec 2025 17:31:20 -0500 Subject: [PATCH] feature/IO-3479-Customer-Phone-Numbers - DB Modifications --- hasura/metadata/tables.yaml | 11 ++++++++++- .../down.sql | 4 ++++ .../up.sql | 2 ++ .../down.sql | 4 ++++ .../up.sql | 2 ++ 5 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 hasura/migrations/1767133700390_alter_table_public_owners_add_column_ownr_ph1_ty/down.sql create mode 100644 hasura/migrations/1767133700390_alter_table_public_owners_add_column_ownr_ph1_ty/up.sql create mode 100644 hasura/migrations/1767133729078_alter_table_public_owners_add_column_ownr_ph2_ty/down.sql create mode 100644 hasura/migrations/1767133729078_alter_table_public_owners_add_column_ownr_ph2_ty/up.sql diff --git a/hasura/metadata/tables.yaml b/hasura/metadata/tables.yaml index 9900fa00b..870dcb880 100644 --- a/hasura/metadata/tables.yaml +++ b/hasura/metadata/tables.yaml @@ -3684,6 +3684,7 @@ - completed_tasks - converted - created_at + - created_user_email - cust_pr - date_estimated - date_exported @@ -3961,6 +3962,7 @@ - completed_tasks - converted - created_at + - created_user_email - cust_pr - date_estimated - date_exported @@ -4251,6 +4253,7 @@ - completed_tasks - converted - created_at + - created_user_email - cust_pr - date_estimated - date_exported @@ -4641,7 +4644,7 @@ request_transform: body: action: transform - template: "{\r\n \"event\": {\r\n \"session_variables\": {\r\n \"x-hasura-user-id\": {{$body?.event?.session_variables?.x-hasura-user-id ?? \"Internal\"}},\r\n \"x-hasura-role\": {{$body?.event?.session_variables?.x-hasura-role ?? \"Internal\"}}\r\n }, \r\n \"op\": {{$body.event.op}},\r\n \"data\": {\r\n \"new\": {\r\n \"id\": {{$body.event.data.new.id}},\r\n \"shopid\": {{$body.event.data.new?.shopid}},\r\n \"ro_number\": {{$body.event.data.new?.ro_number}}\r\n }\r\n }\r\n },\r\n \"trigger\": {\r\n \"name\": \"notifications_jobs_autoadd\"\r\n },\r\n \"table\": {\r\n \"schema\": \"public\",\r\n \"name\": \"jobs\"\r\n }\r\n}\r\n" + template: "{\r\n \"event\": {\r\n \"session_variables\": {\r\n \"x-hasura-user-id\": {{$body?.event?.session_variables?.x-hasura-user-id ?? \"Internal\"}},\r\n \"x-hasura-role\": {{$body?.event?.session_variables?.x-hasura-role ?? \"Internal\"}}\r\n }, \r\n \"op\": {{$body.event.op}},\r\n \"data\": {\r\n \"new\": {\r\n \"id\": {{$body.event.data.new.id}},\r\n \"shopid\": {{$body.event.data.new?.shopid}},\r\n \"ro_number\": {{$body.event.data.new?.ro_number}},\r\n \"created_user_email\": {{$body.event.data.new?.created_user_email}}\r\n }\r\n }\r\n },\r\n \"trigger\": {\r\n \"name\": \"notifications_jobs_autoadd\"\r\n },\r\n \"table\": {\r\n \"schema\": \"public\",\r\n \"name\": \"jobs\"\r\n }\r\n}\r\n" method: POST query_params: {} template_engine: Kriti @@ -5168,7 +5171,9 @@ - ownr_fn - ownr_ln - ownr_ph1 + - ownr_ph1_ty - ownr_ph2 + - ownr_ph2_ty - ownr_st - ownr_title - ownr_zip @@ -5193,7 +5198,9 @@ - ownr_fn - ownr_ln - ownr_ph1 + - ownr_ph1_ty - ownr_ph2 + - ownr_ph2_ty - ownr_st - ownr_title - ownr_zip @@ -5229,7 +5236,9 @@ - ownr_fn - ownr_ln - ownr_ph1 + - ownr_ph1_ty - ownr_ph2 + - ownr_ph2_ty - ownr_st - ownr_title - ownr_zip diff --git a/hasura/migrations/1767133700390_alter_table_public_owners_add_column_ownr_ph1_ty/down.sql b/hasura/migrations/1767133700390_alter_table_public_owners_add_column_ownr_ph1_ty/down.sql new file mode 100644 index 000000000..ca4186489 --- /dev/null +++ b/hasura/migrations/1767133700390_alter_table_public_owners_add_column_ownr_ph1_ty/down.sql @@ -0,0 +1,4 @@ +-- Could not auto-generate a down migration. +-- Please write an appropriate down migration for the SQL below: +-- alter table "public"."owners" add column "ownr_ph1_ty" text +-- null; diff --git a/hasura/migrations/1767133700390_alter_table_public_owners_add_column_ownr_ph1_ty/up.sql b/hasura/migrations/1767133700390_alter_table_public_owners_add_column_ownr_ph1_ty/up.sql new file mode 100644 index 000000000..416ac0d25 --- /dev/null +++ b/hasura/migrations/1767133700390_alter_table_public_owners_add_column_ownr_ph1_ty/up.sql @@ -0,0 +1,2 @@ +alter table "public"."owners" add column "ownr_ph1_ty" text + null; diff --git a/hasura/migrations/1767133729078_alter_table_public_owners_add_column_ownr_ph2_ty/down.sql b/hasura/migrations/1767133729078_alter_table_public_owners_add_column_ownr_ph2_ty/down.sql new file mode 100644 index 000000000..21a718779 --- /dev/null +++ b/hasura/migrations/1767133729078_alter_table_public_owners_add_column_ownr_ph2_ty/down.sql @@ -0,0 +1,4 @@ +-- Could not auto-generate a down migration. +-- Please write an appropriate down migration for the SQL below: +-- alter table "public"."owners" add column "ownr_ph2_ty" text +-- null; diff --git a/hasura/migrations/1767133729078_alter_table_public_owners_add_column_ownr_ph2_ty/up.sql b/hasura/migrations/1767133729078_alter_table_public_owners_add_column_ownr_ph2_ty/up.sql new file mode 100644 index 000000000..381f77c8d --- /dev/null +++ b/hasura/migrations/1767133729078_alter_table_public_owners_add_column_ownr_ph2_ty/up.sql @@ -0,0 +1,2 @@ +alter table "public"."owners" add column "ownr_ph2_ty" text + null;