diff options
author | Rémy Coutable <remy@rymai.me> | 2018-08-01 15:21:24 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2018-08-01 15:21:24 +0000 |
commit | 83a0db0c551236518bdec1a7ae3a1ed1d05f5aaa (patch) | |
tree | e13ad022ea223e7bde5202a31ee81169225fec99 /db | |
parent | ea6fc714bb0306ac8ca56b5dafe4b6777aafe5fc (diff) | |
parent | 12095251c3777c5231cab97854d5dca69d31cc5d (diff) | |
download | gitlab-ce-83a0db0c551236518bdec1a7ae3a1ed1d05f5aaa.tar.gz |
Merge branch 'bvl-user-status-message-35463' into 'master'
Allow users to set a status
Closes #35463
See merge request gitlab-org/gitlab-ce!20614
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20180713092803_create_user_statuses.rb | 20 | ||||
-rw-r--r-- | db/schema.rb | 8 |
2 files changed, 28 insertions, 0 deletions
diff --git a/db/migrate/20180713092803_create_user_statuses.rb b/db/migrate/20180713092803_create_user_statuses.rb new file mode 100644 index 00000000000..cbe21b89ad9 --- /dev/null +++ b/db/migrate/20180713092803_create_user_statuses.rb @@ -0,0 +1,20 @@ +# frozen_string_literal: true + +class CreateUserStatuses < ActiveRecord::Migration + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + def change + 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 + end +end diff --git a/db/schema.rb b/db/schema.rb index 905786172a2..6f3433c1003 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -2069,6 +2069,13 @@ ActiveRecord::Schema.define(version: 20180726172057) do add_index "user_interacted_projects", ["project_id", "user_id"], name: "index_user_interacted_projects_on_project_id_and_user_id", unique: true, using: :btree add_index "user_interacted_projects", ["user_id"], name: "index_user_interacted_projects_on_user_id", using: :btree + create_table "user_statuses", primary_key: "user_id", force: :cascade do |t| + t.integer "cached_markdown_version" + t.string "emoji", default: "speech_balloon", null: false + t.string "message", limit: 100 + t.string "message_html" + end + create_table "user_synced_attributes_metadata", force: :cascade do |t| t.boolean "name_synced", default: false t.boolean "email_synced", default: false @@ -2374,6 +2381,7 @@ ActiveRecord::Schema.define(version: 20180726172057) do add_foreign_key "user_custom_attributes", "users", on_delete: :cascade add_foreign_key "user_interacted_projects", "projects", name: "fk_722ceba4f7", on_delete: :cascade add_foreign_key "user_interacted_projects", "users", name: "fk_0894651f08", on_delete: :cascade + add_foreign_key "user_statuses", "users", on_delete: :cascade add_foreign_key "user_synced_attributes_metadata", "users", on_delete: :cascade add_foreign_key "users", "application_setting_terms", column: "accepted_term_id", name: "fk_789cd90b35", on_delete: :cascade add_foreign_key "users_star_projects", "projects", name: "fk_22cd27ddfc", on_delete: :cascade |