diff options
author | Rémy Coutable <remy@rymai.me> | 2016-11-17 18:08:24 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-11-17 18:08:24 +0000 |
commit | 726a414169e6c3219ff4fd410da3efd53fc7f912 (patch) | |
tree | b3cb53c9bb0724aacbf2181911b2157c5abef67a /db | |
parent | e96ee2a22ba56a77fcec371313e25d3b3c93cff2 (diff) | |
parent | d444fd3460e896065c21abda9a1cafa93f9315a5 (diff) | |
download | gitlab-ce-726a414169e6c3219ff4fd410da3efd53fc7f912.tar.gz |
Merge branch 'chat-name-authorize' into 'master'
Allows to authorize chat user against GitLab.
This is needed for: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7438
See merge request !7450
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20161113184239_create_user_chat_names_table.rb | 21 | ||||
-rw-r--r-- | db/schema.rb | 17 |
2 files changed, 37 insertions, 1 deletions
diff --git a/db/migrate/20161113184239_create_user_chat_names_table.rb b/db/migrate/20161113184239_create_user_chat_names_table.rb new file mode 100644 index 00000000000..97b597654f7 --- /dev/null +++ b/db/migrate/20161113184239_create_user_chat_names_table.rb @@ -0,0 +1,21 @@ +class CreateUserChatNamesTable < ActiveRecord::Migration + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + def change + create_table :chat_names do |t| + t.integer :user_id, null: false + t.integer :service_id, null: false + t.string :team_id, null: false + t.string :team_domain + t.string :chat_id, null: false + t.string :chat_name + t.datetime :last_used_at + t.timestamps null: false + end + + add_index :chat_names, [:user_id, :service_id], unique: true + add_index :chat_names, [:service_id, :team_id, :chat_id], unique: true + end +end diff --git a/db/schema.rb b/db/schema.rb index ed4dfc786f6..72a1553e5ef 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20161109150329) do +ActiveRecord::Schema.define(version: 20161113184239) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -152,6 +152,21 @@ ActiveRecord::Schema.define(version: 20161109150329) do t.text "message_html" end + create_table "chat_names", force: :cascade do |t| + t.integer "user_id", null: false + t.integer "service_id", null: false + t.string "team_id", null: false + t.string "team_domain" + t.string "chat_id", null: false + t.string "chat_name" + t.datetime "last_used_at" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + add_index "chat_names", ["service_id", "team_id", "chat_id"], name: "index_chat_names_on_service_id_and_team_id_and_chat_id", unique: true, using: :btree + add_index "chat_names", ["user_id", "service_id"], name: "index_chat_names_on_user_id_and_service_id", unique: true, using: :btree + create_table "ci_application_settings", force: :cascade do |t| t.boolean "all_broken_builds" t.boolean "add_pusher" |