debian-mirror-gitlab/db/migrate/20200323071918_add_bio_to_user_details.rb

22 lines
554 B
Ruby
Raw Normal View History

2020-04-22 19:07:51 +05:30
# frozen_string_literal: true
class AddBioToUserDetails < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
disable_ddl_transaction!
2020-05-24 23:13:21 +05:30
# rubocop:disable Migration/PreventStrings
2020-04-22 19:07:51 +05:30
def up
2020-05-24 23:13:21 +05:30
# rubocop:disable Migration/AddColumnWithDefault
add_column_with_default(:user_details, :bio, :string, default: '', allow_null: false, limit: 255)
# rubocop:enable Migration/AddColumnWithDefault
2020-04-22 19:07:51 +05:30
end
2020-05-24 23:13:21 +05:30
# rubocop:enable Migration/PreventStrings
2020-04-22 19:07:51 +05:30
def down
remove_column(:user_details, :bio)
end
end