From aebd8da4ae628bc6158aec9772fbbd4d69fd2c6d Mon Sep 17 00:00:00 2001 From: Dave Date: Tue, 17 Mar 2026 11:01:39 -0400 Subject: [PATCH] feature/IO-3587-Commision-Cut - restore Hasura metadata and migrations --- hasura/metadata/tables.yaml | 12 ++++++++++++ .../down.sql | 4 ++++ .../up.sql | 2 ++ .../down.sql | 4 ++++ .../up.sql | 2 ++ .../down.sql | 4 ++++ .../up.sql | 2 ++ .../down.sql | 4 ++++ .../up.sql | 2 ++ 9 files changed, 36 insertions(+) create mode 100644 hasura/migrations/1773331250571_alter_table_public_employee_team_members_add_column_payout_method/down.sql create mode 100644 hasura/migrations/1773331250571_alter_table_public_employee_team_members_add_column_payout_method/up.sql create mode 100644 hasura/migrations/1773331301662_alter_table_public_employee_team_members_add_column_commission_rates/down.sql create mode 100644 hasura/migrations/1773331301662_alter_table_public_employee_team_members_add_column_commission_rates/up.sql create mode 100644 hasura/migrations/1773331441524_alter_table_public_timetickets_add_column_payout_context/down.sql create mode 100644 hasura/migrations/1773331441524_alter_table_public_timetickets_add_column_payout_context/up.sql create mode 100644 hasura/migrations/1773331546522_alter_table_public_tt_approval_queue_add_column_payout_context/down.sql create mode 100644 hasura/migrations/1773331546522_alter_table_public_tt_approval_queue_add_column_payout_context/up.sql diff --git a/hasura/metadata/tables.yaml b/hasura/metadata/tables.yaml index 5d3d3eb85..051a718ef 100644 --- a/hasura/metadata/tables.yaml +++ b/hasura/metadata/tables.yaml @@ -2156,10 +2156,12 @@ - active: _eq: true columns: + - commission_rates - created_at - employeeid - id - labor_rates + - payout_method - percentage - teamid - updated_at @@ -2167,10 +2169,12 @@ - role: user permission: columns: + - commission_rates - created_at - employeeid - id - labor_rates + - payout_method - percentage - teamid - updated_at @@ -2188,10 +2192,12 @@ - role: user permission: columns: + - commission_rates - created_at - employeeid - id - labor_rates + - payout_method - percentage - teamid - updated_at @@ -6506,6 +6512,7 @@ - id - jobid - memo + - payout_context - productivehrs - rate - task_name @@ -6531,6 +6538,7 @@ - id - jobid - memo + - payout_context - productivehrs - rate - task_name @@ -6565,6 +6573,7 @@ - id - jobid - memo + - payout_context - productivehrs - rate - task_name @@ -6748,6 +6757,7 @@ - id - jobid - memo + - payout_context - productivehrs - rate - updated_at @@ -6768,6 +6778,7 @@ - id - jobid - memo + - payout_context - productivehrs - rate - updated_at @@ -6798,6 +6809,7 @@ - id - jobid - memo + - payout_context - productivehrs - rate - updated_at diff --git a/hasura/migrations/1773331250571_alter_table_public_employee_team_members_add_column_payout_method/down.sql b/hasura/migrations/1773331250571_alter_table_public_employee_team_members_add_column_payout_method/down.sql new file mode 100644 index 000000000..c2f4b37cc --- /dev/null +++ b/hasura/migrations/1773331250571_alter_table_public_employee_team_members_add_column_payout_method/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"."employee_team_members" add column "payout_method" text +-- null; diff --git a/hasura/migrations/1773331250571_alter_table_public_employee_team_members_add_column_payout_method/up.sql b/hasura/migrations/1773331250571_alter_table_public_employee_team_members_add_column_payout_method/up.sql new file mode 100644 index 000000000..a239436f1 --- /dev/null +++ b/hasura/migrations/1773331250571_alter_table_public_employee_team_members_add_column_payout_method/up.sql @@ -0,0 +1,2 @@ +alter table "public"."employee_team_members" add column "payout_method" text + null; diff --git a/hasura/migrations/1773331301662_alter_table_public_employee_team_members_add_column_commission_rates/down.sql b/hasura/migrations/1773331301662_alter_table_public_employee_team_members_add_column_commission_rates/down.sql new file mode 100644 index 000000000..2a545d7c0 --- /dev/null +++ b/hasura/migrations/1773331301662_alter_table_public_employee_team_members_add_column_commission_rates/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"."employee_team_members" add column "commission_rates" jsonb +-- null; diff --git a/hasura/migrations/1773331301662_alter_table_public_employee_team_members_add_column_commission_rates/up.sql b/hasura/migrations/1773331301662_alter_table_public_employee_team_members_add_column_commission_rates/up.sql new file mode 100644 index 000000000..6264d5da3 --- /dev/null +++ b/hasura/migrations/1773331301662_alter_table_public_employee_team_members_add_column_commission_rates/up.sql @@ -0,0 +1,2 @@ +alter table "public"."employee_team_members" add column "commission_rates" jsonb + null; diff --git a/hasura/migrations/1773331441524_alter_table_public_timetickets_add_column_payout_context/down.sql b/hasura/migrations/1773331441524_alter_table_public_timetickets_add_column_payout_context/down.sql new file mode 100644 index 000000000..21da54502 --- /dev/null +++ b/hasura/migrations/1773331441524_alter_table_public_timetickets_add_column_payout_context/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"."timetickets" add column "payout_context" jsonb +-- null; diff --git a/hasura/migrations/1773331441524_alter_table_public_timetickets_add_column_payout_context/up.sql b/hasura/migrations/1773331441524_alter_table_public_timetickets_add_column_payout_context/up.sql new file mode 100644 index 000000000..d51cf92cc --- /dev/null +++ b/hasura/migrations/1773331441524_alter_table_public_timetickets_add_column_payout_context/up.sql @@ -0,0 +1,2 @@ +alter table "public"."timetickets" add column "payout_context" jsonb + null; diff --git a/hasura/migrations/1773331546522_alter_table_public_tt_approval_queue_add_column_payout_context/down.sql b/hasura/migrations/1773331546522_alter_table_public_tt_approval_queue_add_column_payout_context/down.sql new file mode 100644 index 000000000..08782d8ea --- /dev/null +++ b/hasura/migrations/1773331546522_alter_table_public_tt_approval_queue_add_column_payout_context/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"."tt_approval_queue" add column "payout_context" jsonb +-- null; diff --git a/hasura/migrations/1773331546522_alter_table_public_tt_approval_queue_add_column_payout_context/up.sql b/hasura/migrations/1773331546522_alter_table_public_tt_approval_queue_add_column_payout_context/up.sql new file mode 100644 index 000000000..493be33c4 --- /dev/null +++ b/hasura/migrations/1773331546522_alter_table_public_tt_approval_queue_add_column_payout_context/up.sql @@ -0,0 +1,2 @@ +alter table "public"."tt_approval_queue" add column "payout_context" jsonb + null;