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:
authorFelipe Artur <fcardozo@gitlab.com>2019-08-30 14:28:20 +0300
committerAndreas Brandl <abrandl@gitlab.com>2019-08-30 14:28:20 +0300
commit0f59d73ef2f65aba791b6738a5e705fe1a8da789 (patch)
treec055c380314058af90bf76fb8208fd71f607f830 /db/post_migrate
parentc965625833c45db84d564da818f580505dc0a1b6 (diff)
Rename epic column state to state_id
Rename epic column state to state_id to be consistent with issues and merge requests
Diffstat (limited to 'db/post_migrate')
-rw-r--r--db/post_migrate/20190822185441_cleanup_epics_state_id_rename.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/db/post_migrate/20190822185441_cleanup_epics_state_id_rename.rb b/db/post_migrate/20190822185441_cleanup_epics_state_id_rename.rb
new file mode 100644
index 00000000000..471b2ab9ca2
--- /dev/null
+++ b/db/post_migrate/20190822185441_cleanup_epics_state_id_rename.rb
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+class CleanupEpicsStateIdRename < ActiveRecord::Migration[5.2]
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ disable_ddl_transaction!
+
+ def up
+ cleanup_concurrent_column_rename :epics, :state, :state_id
+ end
+
+ def down
+ rename_column_concurrently :epics, :state_id, :state
+ end
+end