summaryrefslogtreecommitdiff
path: root/db/migrate/20180529093006_ensure_remote_mirror_columns.rb
diff options
context:
space:
mode:
Diffstat (limited to 'db/migrate/20180529093006_ensure_remote_mirror_columns.rb')
-rw-r--r--db/migrate/20180529093006_ensure_remote_mirror_columns.rb9
1 files changed, 6 insertions, 3 deletions
diff --git a/db/migrate/20180529093006_ensure_remote_mirror_columns.rb b/db/migrate/20180529093006_ensure_remote_mirror_columns.rb
index a0a1150f022..8cf636e1da6 100644
--- a/db/migrate/20180529093006_ensure_remote_mirror_columns.rb
+++ b/db/migrate/20180529093006_ensure_remote_mirror_columns.rb
@@ -5,19 +5,22 @@ class EnsureRemoteMirrorColumns < ActiveRecord::Migration[4.2]
disable_ddl_transaction!
+ # rubocop:disable Migration/Datetime
+ # rubocop:disable Migration/PreventStrings
def up
- # rubocop:disable Migration/Datetime
add_column :remote_mirrors, :last_update_started_at, :datetime unless column_exists?(:remote_mirrors, :last_update_started_at)
- add_column :remote_mirrors, :remote_name, :string unless column_exists?(:remote_mirrors, :remote_name) # rubocop:disable Migration/AddLimitToStringColumns
+ add_column :remote_mirrors, :remote_name, :string unless column_exists?(:remote_mirrors, :remote_name)
unless column_exists?(:remote_mirrors, :only_protected_branches)
- add_column_with_default(:remote_mirrors,
+ add_column_with_default(:remote_mirrors, # rubocop:disable Migration/AddColumnWithDefault
:only_protected_branches,
:boolean,
default: false,
allow_null: false)
end
end
+ # rubocop:enable Migration/PreventStrings
+ # rubocop:enable Migration/Datetime
def down
# db/migrate/20180503131624_create_remote_mirrors.rb will remove the table