2018-07-13 06:22:02 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-11-13 02:27:31 -05:00
|
|
|
class CreateUserStatuses < ActiveRecord::Migration[4.2]
|
2018-07-13 06:22:02 -04:00
|
|
|
include Gitlab::Database::MigrationHelpers
|
|
|
|
|
|
|
|
DOWNTIME = false
|
|
|
|
|
|
|
|
def change
|
2019-08-23 17:36:12 -04:00
|
|
|
# rubocop:disable Migration/AddLimitToStringColumns
|
2018-07-13 06:22:02 -04:00
|
|
|
create_table :user_statuses, id: false, primary_key: :user_id do |t|
|
|
|
|
t.references :user,
|
|
|
|
foreign_key: { on_delete: :cascade },
|
|
|
|
null: false,
|
|
|
|
primary_key: true
|
|
|
|
t.integer :cached_markdown_version, limit: 4
|
|
|
|
t.string :emoji, null: false, default: 'speech_balloon'
|
|
|
|
t.string :message, limit: 100
|
|
|
|
t.string :message_html
|
|
|
|
end
|
2019-08-23 17:36:12 -04:00
|
|
|
# rubocop:enable Migration/AddLimitToStringColumns
|
2018-07-13 06:22:02 -04:00
|
|
|
end
|
|
|
|
end
|