-
Notifications
You must be signed in to change notification settings - Fork 978
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: tweak index for GetIdentityByCredentials
- Loading branch information
Showing
4 changed files
with
24 additions
and
0 deletions.
There are no files selected for viewing
11 changes: 11 additions & 0 deletions
11
...rations/sql/20240104000000000000_identity_credential_identifier_uq_idx.cockroach.down.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
ALTER INDEX identity_credential_identifiers_identifier_nid_type_uq_idx RENAME TO ici_tmp; | ||
|
||
CREATE UNIQUE INDEX | ||
identity_credential_identifiers_identifier_nid_type_uq_idx | ||
ON identity_credential_identifiers( | ||
nid ASC, | ||
identity_credential_type_id ASC, | ||
identifier ASC | ||
); | ||
|
||
DROP INDEX ici_tmp; |
11 changes: 11 additions & 0 deletions
11
...igrations/sql/20240104000000000000_identity_credential_identifier_uq_idx.cockroach.up.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
ALTER INDEX identity_credential_identifiers_identifier_nid_type_uq_idx RENAME TO ici_tmp; | ||
|
||
CREATE UNIQUE INDEX | ||
identity_credential_identifiers_identifier_nid_type_uq_idx | ||
ON identity_credential_identifiers( | ||
nid ASC, | ||
identity_credential_type_id ASC, | ||
identifier ASC | ||
) STORING (identity_credential_id); | ||
|
||
DROP INDEX ici_tmp; |
1 change: 1 addition & 0 deletions
1
...ce/sql/migrations/sql/20240104000000000000_identity_credential_identifier_uq_idx.down.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
-- only applicable to CockroachDB |
1 change: 1 addition & 0 deletions
1
...ence/sql/migrations/sql/20240104000000000000_identity_credential_identifier_uq_idx.up.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
-- only applicable to CockroachDB |