diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-06 09:08:30 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-06 09:08:30 +0300 |
commit | ab128cc125f9db0c3a1bd48845f90c3d61ef42c9 (patch) | |
tree | c3a1fc2bc7a6109b35597fd6e7a0a11089af0ec4 /db/migrate/20200227164113_create_scim_identities.rb | |
parent | a6011c3d70e0e8ac318ba6629183c44f8614c4df (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db/migrate/20200227164113_create_scim_identities.rb')
-rw-r--r-- | db/migrate/20200227164113_create_scim_identities.rb | 18 |
1 files changed, 18 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 |