diff options
Diffstat (limited to 'db/post_migrate/20210729193056_drop_ci_test_cases_table.rb')
-rw-r--r-- | db/post_migrate/20210729193056_drop_ci_test_cases_table.rb | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/db/post_migrate/20210729193056_drop_ci_test_cases_table.rb b/db/post_migrate/20210729193056_drop_ci_test_cases_table.rb new file mode 100644 index 00000000000..2de1749721d --- /dev/null +++ b/db/post_migrate/20210729193056_drop_ci_test_cases_table.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true + +class DropCiTestCasesTable < ActiveRecord::Migration[6.1] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + def up + drop_table :ci_test_cases + end + + def down + create_table_with_constraints :ci_test_cases do |t| + t.bigint :project_id, null: false + t.text :key_hash, null: false + t.text_limit :key_hash, 64 + + t.index [:project_id, :key_hash], unique: true + end + end +end |