Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'db/post_migrate/20220706071304_drop_clusters_integration_elasticstack_table.rb')
-rw-r--r--db/post_migrate/20220706071304_drop_clusters_integration_elasticstack_table.rb22
1 files changed, 22 insertions, 0 deletions
diff --git a/db/post_migrate/20220706071304_drop_clusters_integration_elasticstack_table.rb b/db/post_migrate/20220706071304_drop_clusters_integration_elasticstack_table.rb
new file mode 100644
index 00000000000..206652b5dcf
--- /dev/null
+++ b/db/post_migrate/20220706071304_drop_clusters_integration_elasticstack_table.rb
@@ -0,0 +1,22 @@
+# frozen_string_literal: true
+
+class DropClustersIntegrationElasticstackTable < Gitlab::Database::Migration[2.0]
+ disable_ddl_transaction!
+
+ INDEX_NAME = 'index_clusters_integration_elasticstack_enabled'
+
+ def up
+ drop_table :clusters_integration_elasticstack
+ end
+
+ def down
+ create_table :clusters_integration_elasticstack, id: false do |t|
+ t.timestamps_with_timezone null: false
+ t.references :cluster, primary_key: true, type: :bigint, default: nil, index: false
+ t.boolean :enabled, null: false, default: false
+ t.text :chart_version, limit: 10
+ end
+
+ add_concurrent_index(:clusters_integration_elasticstack, [:enabled, :created_at, :cluster_id], name: INDEX_NAME)
+ end
+end