diff options
author | Tiago Botelho <tiagonbotelho@hotmail.com> | 2018-05-03 15:19:21 +0100 |
---|---|---|
committer | Tiago Botelho <tiagonbotelho@hotmail.com> | 2018-05-07 12:00:13 +0200 |
commit | 961255b107370a1350f91d0835cf0e849d237f7d (patch) | |
tree | 74690c9c0df07f86a6acccc5b7ebc51d310fefa2 /db/migrate/20180503141722_add_remote_mirror_available_overridden_to_projects.rb | |
parent | 9a13059332a0c81b3a953f57bb9e40346eba951d (diff) | |
download | gitlab-ce-961255b107370a1350f91d0835cf0e849d237f7d.tar.gz |
Adds remote mirror table migration
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.rb | 15 |
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 |