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
path: root/db
diff options
context:
space:
mode:
Diffstat (limited to 'db')
-rw-r--r--db/post_migrate/20170309171644_reset_relative_position_for_issue.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/db/post_migrate/20170309171644_reset_relative_position_for_issue.rb b/db/post_migrate/20170309171644_reset_relative_position_for_issue.rb
new file mode 100644
index 00000000000..ce4be131d40
--- /dev/null
+++ b/db/post_migrate/20170309171644_reset_relative_position_for_issue.rb
@@ -0,0 +1,18 @@
+# See http://doc.gitlab.com/ce/development/migration_style_guide.html
+# for more information on how to write migrations for GitLab.
+
+class ResetRelativePositionForIssue < ActiveRecord::Migration
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ def up
+ execute <<-EOS
+ UPDATE issues SET relative_position = NULL
+ WHERE issues.relative_position IS NOT NULL;
+ EOS
+ end
+
+ def down
+ end
+end