From 2f2337da228708e9331c560ae6e539d22012fdaf Mon Sep 17 00:00:00 2001 From: Ted Alexander Date: Wed, 6 May 2026 13:15:29 -0400 Subject: [PATCH 1/4] chore: adding tables for 20260506 --- .../repo/migrations/20260330120000_adding-tables-20260330.exs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ex_cubic_ingestion/priv/repo/migrations/20260330120000_adding-tables-20260330.exs b/ex_cubic_ingestion/priv/repo/migrations/20260330120000_adding-tables-20260330.exs index e8e0909..f8f83f5 100644 --- a/ex_cubic_ingestion/priv/repo/migrations/20260330120000_adding-tables-20260330.exs +++ b/ex_cubic_ingestion/priv/repo/migrations/20260330120000_adding-tables-20260330.exs @@ -51,8 +51,8 @@ defmodule ExCubicIngestion.Repo.Migrations.AddingTables20260330 do Repo.transaction(fn -> Enum.each(@ods_tables, fn ods_table -> ods_table_rec = CubicTable.get_by!(name: ods_table[:name]) - Repo.delete!(CubicOdsTableSnapshot.get_by!(table_id: ods_table_rec.id)) Repo.delete!(ods_table_rec) + Repo.delete!(CubicOdsTableSnapshot.get_by!(table_id: ods_table_rec.id)) end) end) end From 5209bbc2a8816962b55bc87fa3f8ec39b96b9dce Mon Sep 17 00:00:00 2001 From: Ted Alexander Date: Wed, 6 May 2026 13:19:44 -0400 Subject: [PATCH 2/4] Reverting accidental line change to old migration --- .../repo/migrations/20260330120000_adding-tables-20260330.exs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ex_cubic_ingestion/priv/repo/migrations/20260330120000_adding-tables-20260330.exs b/ex_cubic_ingestion/priv/repo/migrations/20260330120000_adding-tables-20260330.exs index f8f83f5..e8e0909 100644 --- a/ex_cubic_ingestion/priv/repo/migrations/20260330120000_adding-tables-20260330.exs +++ b/ex_cubic_ingestion/priv/repo/migrations/20260330120000_adding-tables-20260330.exs @@ -51,8 +51,8 @@ defmodule ExCubicIngestion.Repo.Migrations.AddingTables20260330 do Repo.transaction(fn -> Enum.each(@ods_tables, fn ods_table -> ods_table_rec = CubicTable.get_by!(name: ods_table[:name]) - Repo.delete!(ods_table_rec) Repo.delete!(CubicOdsTableSnapshot.get_by!(table_id: ods_table_rec.id)) + Repo.delete!(ods_table_rec) end) end) end From cf3acee75665dc28045dd27e45b1e030cdd64080 Mon Sep 17 00:00:00 2001 From: Ted Alexander Date: Wed, 6 May 2026 13:20:16 -0400 Subject: [PATCH 3/4] chore: adding tables for 20260506 --- .../20260506120000_adding-tables-20260506.exs | 43 +++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 ex_cubic_ingestion/priv/repo/migrations/20260506120000_adding-tables-20260506.exs diff --git a/ex_cubic_ingestion/priv/repo/migrations/20260506120000_adding-tables-20260506.exs b/ex_cubic_ingestion/priv/repo/migrations/20260506120000_adding-tables-20260506.exs new file mode 100644 index 0000000..7c9a553 --- /dev/null +++ b/ex_cubic_ingestion/priv/repo/migrations/20260506120000_adding-tables-20260506.exs @@ -0,0 +1,43 @@ +defmodule ExCubicIngestion.Repo.Migrations.AddingTables20260506 do + use Ecto.Migration + + alias ExCubicIngestion.Repo + alias ExCubicIngestion.Schema.CubicTable + alias ExCubicIngestion.Schema.CubicOdsTableSnapshot + + @ods_tables [ + %{ + name: "cubic_ods_qlik__edw_route_group_dimension", + s3_prefix: "cubic/ods_qlik/EDW.ROUTE_GROUP_DIMENSION/" + }, + ] + + def up do + Repo.transaction(fn -> + Enum.each(@ods_tables, fn ods_table -> + ods_table_rec = + Repo.insert!(%CubicTable{ + name: ods_table[:name], + s3_prefix: ods_table[:s3_prefix], + is_active: true, + is_raw: true + }) + + Repo.insert!(%CubicOdsTableSnapshot{ + table_id: ods_table_rec.id, + snapshot_s3_key: "#{ods_table[:s3_prefix]}LOAD00000001.csv.gz" + }) + end) + end) + end + + def down do + Repo.transaction(fn -> + Enum.each(@ods_tables, fn ods_table -> + ods_table_rec = CubicTable.get_by!(name: ods_table[:name]) + Repo.delete!(CubicOdsTableSnapshot.get_by!(table_id: ods_table_rec.id)) + Repo.delete!(ods_table_rec) + end) + end) + end +end From ddde45356e206430d897ad86b82119c35759ef94 Mon Sep 17 00:00:00 2001 From: Ted Alexander Date: Wed, 6 May 2026 13:23:31 -0400 Subject: [PATCH 4/4] fix: updating asdf to fix CI action --- .github/workflows/ci.yaml | 2 +- .github/workflows/glue-python-deploy.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index cf364de..11a37e7 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -21,7 +21,7 @@ jobs: key: ${{ runner.os }}-asdf-${{ hashFiles('.tool-versions') }} id: asdf-cache # only run `asdf install` if we didn't hit the cache - - uses: asdf-vm/actions/install@v1 + - uses: asdf-vm/actions/install@v4 if: steps.asdf-cache.outputs.cache-hit != 'true' # only install Hex/Rebar if we didn't hit the cache - if: steps.asdf-cache.outputs.cache-hit != 'true' diff --git a/.github/workflows/glue-python-deploy.yaml b/.github/workflows/glue-python-deploy.yaml index dffb0a4..ef55de1 100644 --- a/.github/workflows/glue-python-deploy.yaml +++ b/.github/workflows/glue-python-deploy.yaml @@ -25,7 +25,7 @@ jobs: key: ${{ runner.os }}-asdf-${{ hashFiles('.tool-versions') }} id: asdf-cache # only run `asdf install` if we didn't hit the cache - - uses: asdf-vm/actions/install@v1 + - uses: asdf-vm/actions/install@v4 if: steps.asdf-cache.outputs.cache-hit != 'true' # only install Hex/Rebar if we didn't hit the cache - if: steps.asdf-cache.outputs.cache-hit != 'true'