summaryrefslogtreecommitdiff
path: root/db/migrate/20180503141722_add_remote_mirror_available_overridden_to_projects.rb
diff options
context:
space:
mode:
authorClement Ho <ClemMakesApps@gmail.com>2018-05-08 10:49:30 -0500
committerClement Ho <ClemMakesApps@gmail.com>2018-05-08 10:49:30 -0500
commit5955caed321e242bfebe52a4b47346a01a50e4f6 (patch)
treed9710c0732ce21801b4a79a281bec0bd39582a95 /db/migrate/20180503141722_add_remote_mirror_available_overridden_to_projects.rb
parentf9e2b4730f58ba630344c9554eb907ab003abbd5 (diff)
parent533593e95cd3a922a2ec2ea43b345862361dfd67 (diff)
downloadgitlab-ce-5955caed321e242bfebe52a4b47346a01a50e4f6.tar.gz
Merge branch 'master' into bootstrap4
Diffstat (limited to 'db/migrate/20180503141722_add_remote_mirror_available_overridden_to_projects.rb')
-rw-r--r--db/migrate/20180503141722_add_remote_mirror_available_overridden_to_projects.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/db/migrate/20180503141722_add_remote_mirror_available_overridden_to_projects.rb b/db/migrate/20180503141722_add_remote_mirror_available_overridden_to_projects.rb
new file mode 100644
index 00000000000..841393971f4
--- /dev/null
+++ b/db/migrate/20180503141722_add_remote_mirror_available_overridden_to_projects.rb
@@ -0,0 +1,15 @@
+class AddRemoteMirrorAvailableOverriddenToProjects < ActiveRecord::Migration
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ disable_ddl_transaction!
+
+ def up
+ add_column(:projects, :remote_mirror_available_overridden, :boolean) unless column_exists?(:projects, :remote_mirror_available_overridden)
+ end
+
+ def down
+ remove_column(:projects, :remote_mirror_available_overridden) if column_exists?(:projects, :remote_mirror_available_overridden)
+ end
+end