summaryrefslogtreecommitdiff
path: root/db/migrate/20210203092540_remove_has_external_wiki_constraint.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-02-18 10:34:06 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-02-18 10:34:06 +0000
commit859a6fb938bb9ee2a317c46dfa4fcc1af49608f0 (patch)
treed7f2700abe6b4ffcb2dcfc80631b2d87d0609239 /db/migrate/20210203092540_remove_has_external_wiki_constraint.rb
parent446d496a6d000c73a304be52587cd9bbc7493136 (diff)
downloadgitlab-ce-859a6fb938bb9ee2a317c46dfa4fcc1af49608f0.tar.gz
Add latest changes from gitlab-org/gitlab@13-9-stable-eev13.9.0-rc42
Diffstat (limited to 'db/migrate/20210203092540_remove_has_external_wiki_constraint.rb')
-rw-r--r--db/migrate/20210203092540_remove_has_external_wiki_constraint.rb20
1 files changed, 20 insertions, 0 deletions
diff --git a/db/migrate/20210203092540_remove_has_external_wiki_constraint.rb b/db/migrate/20210203092540_remove_has_external_wiki_constraint.rb
new file mode 100644
index 00000000000..80b0cc11685
--- /dev/null
+++ b/db/migrate/20210203092540_remove_has_external_wiki_constraint.rb
@@ -0,0 +1,20 @@
+# frozen_string_literal: true
+
+class RemoveHasExternalWikiConstraint < ActiveRecord::Migration[6.0]
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ disable_ddl_transaction!
+
+ def up
+ # This reverts the following migration: add_not_null_constraint :projects, :has_external_wiki, validate: false
+ if check_not_null_constraint_exists?(:projects, :has_external_wiki)
+ remove_not_null_constraint :projects, :has_external_wiki
+ end
+ end
+
+ def down
+ # no-op
+ end
+end