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/20210729192959_drop_ci_test_case_failures_table.rb')
-rw-r--r--db/post_migrate/20210729192959_drop_ci_test_case_failures_table.rb24
1 files changed, 24 insertions, 0 deletions
diff --git a/db/post_migrate/20210729192959_drop_ci_test_case_failures_table.rb b/db/post_migrate/20210729192959_drop_ci_test_case_failures_table.rb
new file mode 100644
index 00000000000..ad6676a1704
--- /dev/null
+++ b/db/post_migrate/20210729192959_drop_ci_test_case_failures_table.rb
@@ -0,0 +1,24 @@
+# frozen_string_literal: true
+
+class DropCiTestCaseFailuresTable < ActiveRecord::Migration[6.1]
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ disable_ddl_transaction!
+
+ def up
+ drop_table :ci_test_case_failures
+ end
+
+ def down
+ create_table :ci_test_case_failures do |t|
+ t.datetime_with_timezone :failed_at
+ t.bigint :test_case_id, null: false
+ t.bigint :build_id, null: false
+
+ t.index [:test_case_id, :failed_at, :build_id], name: 'index_test_case_failures_unique_columns', unique: true, order: { failed_at: :desc }
+ t.index :build_id
+ end
+ end
+end