diff options
author | Valery Sizov <valery@gitlab.com> | 2017-03-09 20:23:36 +0300 |
---|---|---|
committer | Valery Sizov <valery@gitlab.com> | 2017-03-14 15:11:59 +0300 |
commit | 67686e38fdb1d9c427a39ff1862af691ccd4e598 (patch) | |
tree | be45741d556724caa1b87ecdd04bc22739d5a30a /db/post_migrate/20170309171644_reset_relative_position_for_issue.rb | |
parent | 96fe1856da46517b028fe0ddac89f314f25c8855 (diff) |
Added migration to reset existing relative_position for issues
Diffstat (limited to 'db/post_migrate/20170309171644_reset_relative_position_for_issue.rb')
-rw-r--r-- | db/post_migrate/20170309171644_reset_relative_position_for_issue.rb | 18 |
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 |