diff --git a/build/charts/theia/provisioning/datasources/migrators/000005_0-5-0.down.sql b/build/charts/theia/provisioning/datasources/migrators/000005_0-5-0.down.sql deleted file mode 100644 index af51c9d1..00000000 --- a/build/charts/theia/provisioning/datasources/migrators/000005_0-5-0.down.sql +++ /dev/null @@ -1,13 +0,0 @@ ---Drop aggregated TAD columns -ALTER TABLE tadetector DROP COLUMN podNamespace String; -ALTER TABLE tadetector_local DROP COLUMN podNamespace String; -ALTER TABLE tadetector DROP COLUMN podLabels String; -ALTER TABLE tadetector_local DROP COLUMN podLabels String; -ALTER TABLE tadetector DROP COLUMN destinationServicePortName String; -ALTER TABLE tadetector_local DROP COLUMN destinationServicePortName String; -ALTER TABLE tadetector DROP COLUMN aggType String; -ALTER TABLE tadetector_local DROP COLUMN aggType String; -ALTER TABLE tadetector DROP COLUMN direction String; -ALTER TABLE tadetector_local DROP COLUMN direction String; -ALTER TABLE tadetector DROP COLUMN podName String; -ALTER TABLE tadetector_local DROP COLUMN podName String; diff --git a/build/charts/theia/provisioning/datasources/migrators/000005_0-5-0.up.sql b/build/charts/theia/provisioning/datasources/migrators/000005_0-5-0.up.sql deleted file mode 100644 index e10544b2..00000000 --- a/build/charts/theia/provisioning/datasources/migrators/000005_0-5-0.up.sql +++ /dev/null @@ -1,13 +0,0 @@ ---Add aggregated TAD columns -ALTER TABLE tadetector ADD COLUMN podNamespace String; -ALTER TABLE tadetector_local ADD COLUMN podNamespace String; -ALTER TABLE tadetector ADD COLUMN podLabels String; -ALTER TABLE tadetector_local ADD COLUMN podLabels String; -ALTER TABLE tadetector ADD COLUMN destinationServicePortName String; -ALTER TABLE tadetector_local ADD COLUMN destinationServicePortName String; -ALTER TABLE tadetector ADD COLUMN aggType String; -ALTER TABLE tadetector_local ADD COLUMN aggType String; -ALTER TABLE tadetector ADD COLUMN direction String; -ALTER TABLE tadetector_local ADD COLUMN direction String; -ALTER TABLE tadetector ADD COLUMN podName String; -ALTER TABLE tadetector_local ADD COLUMN podName String; diff --git a/build/charts/theia/provisioning/datasources/migrators/000005_0-6-0.down.sql b/build/charts/theia/provisioning/datasources/migrators/000005_0-6-0.down.sql index bdaa7022..a378c976 100644 --- a/build/charts/theia/provisioning/datasources/migrators/000005_0-6-0.down.sql +++ b/build/charts/theia/provisioning/datasources/migrators/000005_0-6-0.down.sql @@ -198,3 +198,17 @@ ALTER TABLE flows ALTER TABLE flows_local DROP COLUMN egressName, DROP COLUMN egressIP; +ALTER TABLE tadetector + DROP COLUMN podNamespace, + DROP COLUMN podLabels, + DROP COLUMN destinationServicePortName, + DROP COLUMN aggType, + DROP COLUMN direction, + DROP COLUMN podName; +ALTER TABLE tadetector_local + DROP COLUMN podNamespace, + DROP COLUMN podLabels, + DROP COLUMN destinationServicePortName, + DROP COLUMN aggType, + DROP COLUMN direction, + DROP COLUMN podName; diff --git a/build/charts/theia/provisioning/datasources/migrators/000005_0-6-0.up.sql b/build/charts/theia/provisioning/datasources/migrators/000005_0-6-0.up.sql index 28295388..b5ac3bcf 100644 --- a/build/charts/theia/provisioning/datasources/migrators/000005_0-6-0.up.sql +++ b/build/charts/theia/provisioning/datasources/migrators/000005_0-6-0.up.sql @@ -137,3 +137,17 @@ ALTER TABLE flows ALTER TABLE flows_local ADD COLUMN egressName String, ADD COLUMN egressIP String; +ALTER TABLE tadetector + ADD COLUMN podNamespace String, + ADD COLUMN podLabels String, + ADD COLUMN destinationServicePortName String, + ADD COLUMN aggType String, + ADD COLUMN direction String, + ADD COLUMN podName String; +ALTER TABLE tadetector_local + ADD COLUMN podNamespace String, + ADD COLUMN podLabels String, + ADD COLUMN destinationServicePortName String, + ADD COLUMN aggType String, + ADD COLUMN direction String, + ADD COLUMN podName String; diff --git a/build/yamls/flow-visibility.yml b/build/yamls/flow-visibility.yml index 884f10cb..61b0fcea 100644 --- a/build/yamls/flow-visibility.yml +++ b/build/yamls/flow-visibility.yml @@ -589,6 +589,20 @@ data: ALTER TABLE flows_local DROP COLUMN egressName, DROP COLUMN egressIP; + ALTER TABLE tadetector + DROP COLUMN podNamespace, + DROP COLUMN podLabels, + DROP COLUMN destinationServicePortName, + DROP COLUMN aggType, + DROP COLUMN direction, + DROP COLUMN podName; + ALTER TABLE tadetector_local + DROP COLUMN podNamespace, + DROP COLUMN podLabels, + DROP COLUMN destinationServicePortName, + DROP COLUMN aggType, + DROP COLUMN direction, + DROP COLUMN podName; 000005_0-6-0.up.sql: | -- Create underlying tables for Materialized Views to attach data CREATE TABLE IF NOT EXISTS pod_view_table_local ( @@ -729,6 +743,20 @@ data: ALTER TABLE flows_local ADD COLUMN egressName String, ADD COLUMN egressIP String; + ALTER TABLE tadetector + ADD COLUMN podNamespace String, + ADD COLUMN podLabels String, + ADD COLUMN destinationServicePortName String, + ADD COLUMN aggType String, + ADD COLUMN direction String, + ADD COLUMN podName String; + ALTER TABLE tadetector_local + ADD COLUMN podNamespace String, + ADD COLUMN podLabels String, + ADD COLUMN destinationServicePortName String, + ADD COLUMN aggType String, + ADD COLUMN direction String, + ADD COLUMN podName String; create_table.sh: | #!/usr/bin/env bash