summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorcharlie ablett <cablett@gitlab.com>2019-07-31 13:51:46 +0000
committerPaul Slaughter <pslaughter@gitlab.com>2019-07-31 13:51:46 +0000
commit5d7b46d523bb2310ac33d5b4c06137e9a3fd17aa (patch)
tree7a0ffa08b63f6431e3f29691ae681bd12b97b59e /db
parentbea3d730c2257d5c5e4f2539f4e4b1b81be84250 (diff)
downloadgitlab-ce-5d7b46d523bb2310ac33d5b4c06137e9a3fd17aa.tar.gz
Port CE changes from EE
- DB migration of board milestone values - issue finder & spec updates
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20190703001120_default_milestone_to_nil.rb24
1 files changed, 24 insertions, 0 deletions
diff --git a/db/migrate/20190703001120_default_milestone_to_nil.rb b/db/migrate/20190703001120_default_milestone_to_nil.rb
new file mode 100644
index 00000000000..6a1c3603d9d
--- /dev/null
+++ b/db/migrate/20190703001120_default_milestone_to_nil.rb
@@ -0,0 +1,24 @@
+# frozen_string_literal: true
+
+class DefaultMilestoneToNil < ActiveRecord::Migration[5.1]
+ DOWNTIME = false
+
+ def up
+ execute(update_board_milestones_query)
+ end
+
+ def down
+ # no-op
+ end
+
+ private
+
+ # Only 105 records to update, as of 2019/07/18
+ def update_board_milestones_query
+ <<~HEREDOC
+ UPDATE boards
+ SET milestone_id = NULL
+ WHERE boards.milestone_id = -1
+ HEREDOC
+ end
+end