diff --git a/collections/user.yml b/collections/user.yml index e5766022..669c9484 100644 --- a/collections/user.yml +++ b/collections/user.yml @@ -14,6 +14,12 @@ fields: type: string unique: true restriction_mode: B + idp_id: + type: string + minLength: 1 + unique: true + restriction_mode: B + description: unique-key from IDP for login saml_id: type: string minLength: 1 diff --git a/dev/sql/schema_relational.sql b/dev/sql/schema_relational.sql index b0ecac7c..ae7da53d 100644 --- a/dev/sql/schema_relational.sql +++ b/dev/sql/schema_relational.sql @@ -2437,6 +2437,9 @@ CREATE TABLE user_t ( CONSTRAINT unique_user_username UNIQUE, member_number varchar(256) CONSTRAINT unique_user_member_number UNIQUE, + idp_id varchar(256) + CONSTRAINT unique_user_idp_id UNIQUE + CONSTRAINT minlength_user_idp_id CHECK (char_length(idp_id) >= 1), saml_id varchar(256) CONSTRAINT unique_user_saml_id UNIQUE CONSTRAINT minlength_user_saml_id CHECK (char_length(saml_id) >= 1), @@ -2470,6 +2473,7 @@ CREATE TABLE user_t ( +comment on column user_t.idp_id is 'unique-key fromIDP for login'; comment on column user_t.saml_id is 'unique-key from IdP for SAML login'; comment on column user_t.organization_management_level is 'Hierarchical permission level for the whole organization.'; @@ -6287,4 +6291,4 @@ There are 2 errors/warnings projection/content: type:JSON is marked as a calculated field and not generated in schema */ -/* Missing attribute handling for on_delete, constant_legacy, deferred */ \ No newline at end of file +/* Missing attribute handling for on_delete, constant_legacy, deferred */