summaryrefslogtreecommitdiff
path: root/db/migrate
diff options
context:
space:
mode:
authorAshley Dumaine <adumaine@datto.com>2017-08-28 17:38:06 -0400
committerSean McGivern <sean@gitlab.com>2017-09-06 10:07:46 +0100
commitef4b3a39bc705dfa47762868ea064d2dbadc16e6 (patch)
tree62d4c53338eb976f1b854ecbe97e21b01bf894c9 /db/migrate
parent446c7fc6f190ac8b8bb879a2a5be37c95fafdd13 (diff)
downloadgitlab-ce-ef4b3a39bc705dfa47762868ea064d2dbadc16e6.tar.gz
Add functionality to collapse outdated diff comments regardless of discussion resolution
Diffstat (limited to 'db/migrate')
-rw-r--r--db/migrate/20170825154015_collapse_outdated_diff_comments.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/db/migrate/20170825154015_collapse_outdated_diff_comments.rb b/db/migrate/20170825154015_collapse_outdated_diff_comments.rb
new file mode 100644
index 00000000000..cbfdd3ba2c2
--- /dev/null
+++ b/db/migrate/20170825154015_collapse_outdated_diff_comments.rb
@@ -0,0 +1,18 @@
+# rubocop:disable Migration/AddColumnWithDefaultToLargeTable
+class CollapseOutdatedDiffComments < ActiveRecord::Migration
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+ disable_ddl_transaction!
+
+ def up
+ add_column_with_default(:projects,
+ :collapse_outdated_diff_comments,
+ :boolean,
+ default: false)
+ end
+
+ def down
+ remove_column(:projects, :collapse_outdated_diff_comments)
+ end
+end