summaryrefslogtreecommitdiff
path: root/db/post_migrate/20191017180026_drop_ci_build_trace_sections_id.rb
diff options
context:
space:
mode:
Diffstat (limited to 'db/post_migrate/20191017180026_drop_ci_build_trace_sections_id.rb')
-rw-r--r--db/post_migrate/20191017180026_drop_ci_build_trace_sections_id.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/db/post_migrate/20191017180026_drop_ci_build_trace_sections_id.rb b/db/post_migrate/20191017180026_drop_ci_build_trace_sections_id.rb
new file mode 100644
index 00000000000..0405e23b465
--- /dev/null
+++ b/db/post_migrate/20191017180026_drop_ci_build_trace_sections_id.rb
@@ -0,0 +1,19 @@
+# frozen_string_literal: true
+
+class DropCiBuildTraceSectionsId < ActiveRecord::Migration[5.2]
+ DOWNTIME = false
+
+ def up
+ ##
+ # This column has already been ignored since 12.4
+ # See https://gitlab.com/gitlab-org/gitlab/issues/32569
+ remove_column :ci_build_trace_sections, :id
+ end
+
+ def down
+ ##
+ # We don't backfill serial ids as it's not used in application code
+ # and quite expensive process.
+ add_column :ci_build_trace_sections, :id, :bigint
+ end
+end