2020-03-26 15:08:16 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class AddBioToUserDetails < ActiveRecord::Migration[6.0]
|
|
|
|
include Gitlab::Database::MigrationHelpers
|
|
|
|
|
|
|
|
DOWNTIME = false
|
|
|
|
|
|
|
|
disable_ddl_transaction!
|
|
|
|
|
2020-04-21 15:21:10 +00:00
|
|
|
# rubocop:disable Migration/PreventStrings
|
2020-03-26 15:08:16 +00:00
|
|
|
def up
|
|
|
|
add_column_with_default(:user_details, :bio, :string, default: '', allow_null: false, limit: 255, update_column_in_batches_args: { batch_column_name: :user_id })
|
|
|
|
end
|
2020-04-21 15:21:10 +00:00
|
|
|
# rubocop:enable Migration/PreventStrings
|
2020-03-26 15:08:16 +00:00
|
|
|
|
|
|
|
def down
|
|
|
|
remove_column(:user_details, :bio)
|
|
|
|
end
|
|
|
|
end
|