2020-01-07 15:07:34 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class AddRepositoryStorageToSnippets < ActiveRecord::Migration[5.2]
|
|
|
|
include Gitlab::Database::MigrationHelpers
|
|
|
|
|
|
|
|
DOWNTIME = false
|
|
|
|
|
|
|
|
disable_ddl_transaction!
|
|
|
|
|
2020-04-21 15:21:10 +00:00
|
|
|
# rubocop:disable Migration/PreventStrings
|
2020-01-07 15:07:34 +00:00
|
|
|
def up
|
2020-05-15 15:08:04 +00:00
|
|
|
add_column_with_default( # rubocop:disable Migration/AddColumnWithDefault
|
2020-01-07 15:07:34 +00:00
|
|
|
:snippets,
|
|
|
|
:repository_storage,
|
|
|
|
:string,
|
|
|
|
default: 'default',
|
|
|
|
limit: 255,
|
|
|
|
allow_null: false
|
|
|
|
)
|
|
|
|
end
|
2020-04-21 15:21:10 +00:00
|
|
|
# rubocop:enable Migration/PreventStrings
|
2020-01-07 15:07:34 +00:00
|
|
|
|
|
|
|
def down
|
|
|
|
remove_column(:snippets, :repository_storage)
|
|
|
|
end
|
|
|
|
end
|