diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-06 06:08:30 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-06 06:08:30 +0000 |
commit | ab128cc125f9db0c3a1bd48845f90c3d61ef42c9 (patch) | |
tree | c3a1fc2bc7a6109b35597fd6e7a0a11089af0ec4 /db | |
parent | a6011c3d70e0e8ac318ba6629183c44f8614c4df (diff) | |
download | gitlab-ce-ab128cc125f9db0c3a1bd48845f90c3d61ef42c9.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20200227164113_create_scim_identities.rb | 18 | ||||
-rw-r--r-- | db/schema.rb | 14 |
2 files changed, 32 insertions, 0 deletions
diff --git a/db/migrate/20200227164113_create_scim_identities.rb b/db/migrate/20200227164113_create_scim_identities.rb new file mode 100644 index 00000000000..1942270761b --- /dev/null +++ b/db/migrate/20200227164113_create_scim_identities.rb @@ -0,0 +1,18 @@ +# frozen_string_literal: true + +class CreateScimIdentities < ActiveRecord::Migration[6.0] + DOWNTIME = false + + def change + create_table :scim_identities do |t| + t.references :group, foreign_key: { to_table: :namespaces, on_delete: :cascade }, null: false + t.references :user, index: false, foreign_key: { on_delete: :cascade }, null: false + t.timestamps_with_timezone + t.boolean :active, default: false + t.string :extern_uid, null: false, limit: 255 + + t.index 'LOWER(extern_uid),group_id', name: 'index_scim_identities_on_lower_extern_uid_and_group_id', unique: true + t.index [:user_id, :group_id], unique: true + end + end +end diff --git a/db/schema.rb b/db/schema.rb index 2e7e0d8ce7c..e77e8e44b62 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -3819,6 +3819,18 @@ ActiveRecord::Schema.define(version: 2020_03_04_160823) do t.index ["group_id"], name: "index_saml_providers_on_group_id" end + create_table "scim_identities", force: :cascade do |t| + t.bigint "group_id", null: false + t.bigint "user_id", null: false + t.datetime_with_timezone "created_at", null: false + t.datetime_with_timezone "updated_at", null: false + t.boolean "active", default: false + t.string "extern_uid", limit: 255, null: false + t.index "lower((extern_uid)::text), group_id", name: "index_scim_identities_on_lower_extern_uid_and_group_id", unique: true + t.index ["group_id"], name: "index_scim_identities_on_group_id" + t.index ["user_id", "group_id"], name: "index_scim_identities_on_user_id_and_group_id", unique: true + end + create_table "scim_oauth_access_tokens", id: :serial, force: :cascade do |t| t.datetime_with_timezone "created_at", null: false t.datetime_with_timezone "updated_at", null: false @@ -5037,6 +5049,8 @@ ActiveRecord::Schema.define(version: 2020_03_04_160823) do add_foreign_key "reviews", "projects", on_delete: :cascade add_foreign_key "reviews", "users", column: "author_id", on_delete: :nullify add_foreign_key "saml_providers", "namespaces", column: "group_id", on_delete: :cascade + add_foreign_key "scim_identities", "namespaces", column: "group_id", on_delete: :cascade + add_foreign_key "scim_identities", "users", on_delete: :cascade add_foreign_key "scim_oauth_access_tokens", "namespaces", column: "group_id", on_delete: :cascade add_foreign_key "security_scans", "ci_builds", column: "build_id", on_delete: :cascade add_foreign_key "self_managed_prometheus_alert_events", "environments", on_delete: :cascade |