debian-mirror-gitlab/db/migrate/20180713092803_create_user_statuses.rb

23 lines
698 B
Ruby
Raw Normal View History

2018-11-18 11:00:15 +05:30
# frozen_string_literal: true
2019-02-15 15:39:39 +05:30
class CreateUserStatuses < ActiveRecord::Migration[4.2]
2018-11-18 11:00:15 +05:30
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
def change
2019-12-04 20:38:33 +05:30
# rubocop:disable Migration/AddLimitToStringColumns
2018-11-18 11:00:15 +05:30
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-12-04 20:38:33 +05:30
# rubocop:enable Migration/AddLimitToStringColumns
2018-11-18 11:00:15 +05:30
end
end