Remove @SecondaryKey from AccountGroup
Like our prior changes, we need to drop these @SecondaryKey annotations for databases which don't support multiple keys on a single entity. For the external name attribute we simply change it to honor a list of groups which match the external name. This allows an administrator to create multiple groups in Gerrit that use the same underlying LDAP group for membership. Its crazy to do, but there isn't really any good reason to not allow it. For the internal name attribute we create a new entity that can be used to enforce uniqueness on the name attribute, and connects the name to the group. Change-Id: I933c38a6a4e2c3ed3d7d5a66cab04c2e7175e24f Signed-off-by: Shawn O. Pearce <sop@google.com>
This commit is contained in:
@@ -33,7 +33,6 @@ ON account_external_ids (email_address);
|
||||
|
||||
-- *********************************************************************
|
||||
-- AccountGroupAccess
|
||||
-- @SecondaryKey("name") covers: all, suggestByName
|
||||
CREATE INDEX account_groups_ownedByGroup
|
||||
ON account_groups (owner_group_id);
|
||||
|
||||
|
||||
@@ -72,7 +72,6 @@ ON account_external_ids (email_address);
|
||||
|
||||
-- *********************************************************************
|
||||
-- AccountGroupAccess
|
||||
-- @SecondaryKey("name") covers: all, suggestByName
|
||||
CREATE INDEX account_groups_ownedByGroup
|
||||
ON account_groups (owner_group_id);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user