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