-
Notifications
You must be signed in to change notification settings - Fork 969
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
78 additions
and
37 deletions.
There are no files selected for viewing
9 changes: 5 additions & 4 deletions
9
...sql/migrations/sql/20241023142500000001_drop_unused_indices_identity_credentials.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 |
---|---|---|
@@ -1,5 +1,6 @@ | ||
CREATE INDEX identity_credentials_nid_identity_id_idx ON identity_credentials (identity_id ASC, nid ASC); | ||
CREATE INDEX identity_credentials_nid_id_idx ON identity_credentials (nid ASC, id ASC); | ||
CREATE INDEX identity_credentials_id_nid_idx ON identity_credentials (id ASC, nid ASC); | ||
CREATE INDEX IF NOT EXISTS identity_credentials_id_nid_idx ON identity_credentials (id ASC, nid ASC); | ||
CREATE INDEX IF NOT EXISTS identity_credentials_nid_id_idx ON identity_credentials (nid ASC, id ASC); | ||
CREATE INDEX IF NOT EXISTS identity_credentials_nid_identity_id_idx ON identity_credentials (identity_id ASC, nid ASC); | ||
|
||
DROP INDEX identity_credentials_nid_identity_id_v2_idx; | ||
DROP INDEX IF EXISTS identity_credentials_identity_id_idx; | ||
DROP INDEX IF EXISTS identity_credentials_nid_idx; |
7 changes: 4 additions & 3 deletions
7
...grations/sql/20241023142500000001_drop_unused_indices_identity_credentials.mysql.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 |
---|---|---|
@@ -1,5 +1,6 @@ | ||
CREATE INDEX identity_credentials_nid_identity_id_idx ON identity_credentials (identity_id ASC, nid ASC); | ||
CREATE INDEX identity_credentials_nid_id_idx ON identity_credentials (nid ASC, id ASC); | ||
CREATE INDEX identity_credentials_id_nid_idx ON identity_credentials (id ASC, nid ASC); | ||
CREATE INDEX identity_credentials_nid_id_idx ON identity_credentials (nid ASC, id ASC); | ||
CREATE INDEX identity_credentials_nid_identity_id_idx ON identity_credentials (identity_id ASC, nid ASC); | ||
|
||
DROP INDEX identity_credentials_nid_identity_id_v2_idx ON identity_credentials; | ||
DROP INDEX identity_credentials_identity_id_idx ON identity_credentials; | ||
DROP INDEX identity_credentials_nid_idx ON identity_credentials; |
5 changes: 3 additions & 2 deletions
5
...migrations/sql/20241023142500000001_drop_unused_indices_identity_credentials.mysql.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 |
---|---|---|
@@ -1,5 +1,6 @@ | ||
CREATE INDEX identity_credentials_nid_identity_id_v2_idx ON identity_credentials (nid ASC, identity_id ASC); | ||
CREATE INDEX identity_credentials_identity_id_idx ON identity_credentials (identity_id ASC); | ||
CREATE INDEX identity_credentials_nid_idx ON identity_credentials (nid ASC); | ||
|
||
DROP INDEX identity_credentials_nid_id_idx ON identity_credentials; | ||
DROP INDEX identity_credentials_id_nid_idx ON identity_credentials; | ||
DROP INDEX identity_credentials_nid_id_idx ON identity_credentials; | ||
DROP INDEX identity_credentials_nid_identity_id_idx ON identity_credentials; |
9 changes: 5 additions & 4 deletions
9
...e/sql/migrations/sql/20241023142500000001_drop_unused_indices_identity_credentials.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 |
---|---|---|
@@ -1,5 +1,6 @@ | ||
CREATE INDEX identity_credentials_nid_identity_id_v2_idx ON identity_credentials (nid ASC, identity_id ASC); | ||
CREATE INDEX IF NOT EXISTS identity_credentials_identity_id_idx ON identity_credentials (identity_id ASC); | ||
CREATE INDEX IF NOT EXISTS identity_credentials_nid_idx ON identity_credentials (nid ASC); | ||
|
||
DROP INDEX identity_credentials_nid_id_idx; | ||
DROP INDEX identity_credentials_id_nid_idx; | ||
DROP INDEX identity_credentials_nid_identity_id_idx; | ||
DROP INDEX IF EXISTS identity_credentials_id_nid_idx; | ||
DROP INDEX IF EXISTS identity_credentials_nid_id_idx; | ||
DROP INDEX IF EXISTS identity_credentials_nid_identity_id_idx; |
15 changes: 8 additions & 7 deletions
15
persistence/sql/migrations/sql/20241023142500000002_drop_unused_indices_sessions.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 |
---|---|---|
@@ -1,8 +1,9 @@ | ||
CREATE INDEX sessions_nid_id_identity_id_idx ON sessions (nid ASC, identity_id ASC, id ASC); | ||
CREATE INDEX sessions_id_nid_idx ON sessions (id ASC, nid ASC); | ||
CREATE INDEX sessions_token_nid_idx ON sessions (nid ASC, token ASC); | ||
CREATE INDEX sessions_identity_id_nid_sorted_idx ON sessions (identity_id ASC, nid ASC, authenticated_at DESC); | ||
CREATE INDEX sessions_nid_created_at_id_idx ON sessions (nid ASC, created_at DESC, id ASC); | ||
CREATE INDEX IF NOT EXISTS sessions_nid_id_identity_id_idx ON sessions(nid ASC, identity_id ASC, id ASC); | ||
CREATE INDEX IF NOT EXISTS sessions_id_nid_idx ON sessions(id ASC, nid ASC); | ||
CREATE INDEX IF NOT EXISTS sessions_token_nid_idx ON sessions(nid ASC, token ASC); | ||
CREATE INDEX IF NOT EXISTS sessions_identity_id_nid_sorted_idx ON sessions(identity_id ASC, nid ASC, authenticated_at DESC); | ||
CREATE INDEX IF NOT EXISTS sessions_nid_created_at_id_idx ON sessions(nid ASC, created_at DESC, id ASC); | ||
|
||
DROP INDEX sessions_nid_expires_at_authenticated_at_idx; | ||
DROP INDEX sessions_identity_id_idx; | ||
DROP INDEX IF EXISTS sessions_list_idx; | ||
DROP INDEX IF EXISTS sessions_list_active_idx; | ||
DROP INDEX IF EXISTS sessions_list_identity_idx; |
9 changes: 9 additions & 0 deletions
9
...tence/sql/migrations/sql/20241023142500000002_drop_unused_indices_sessions.mysql.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,9 @@ | ||
CREATE INDEX sessions_nid_id_identity_id_idx ON sessions(nid ASC, identity_id ASC, id ASC); | ||
CREATE INDEX sessions_id_nid_idx ON sessions(id ASC, nid ASC); | ||
CREATE INDEX sessions_token_nid_idx ON sessions(nid ASC, token ASC); | ||
CREATE INDEX sessions_identity_id_nid_sorted_idx ON sessions(identity_id ASC, nid ASC, authenticated_at DESC); | ||
CREATE INDEX sessions_nid_created_at_id_idx ON sessions(nid ASC, created_at DESC, id ASC); | ||
|
||
DROP INDEX sessions_list_idx ON sessions; | ||
DROP INDEX sessions_list_active_idx ON sessions; | ||
DROP INDEX sessions_list_identity_idx ON sessions; |
9 changes: 9 additions & 0 deletions
9
...istence/sql/migrations/sql/20241023142500000002_drop_unused_indices_sessions.mysql.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,9 @@ | ||
CREATE INDEX sessions_list_idx ON sessions (nid ASC, created_at DESC, id ASC); | ||
CREATE INDEX sessions_list_active_idx ON sessions (nid ASC, expires_at ASC, active ASC, created_at DESC, id ASC); | ||
CREATE INDEX sessions_list_identity_idx ON sessions (nid ASC, identity_id ASC, created_at DESC); | ||
|
||
DROP INDEX sessions_nid_id_identity_id_idx ON sessions; | ||
DROP INDEX sessions_id_nid_idx ON sessions; | ||
DROP INDEX sessions_token_nid_idx ON sessions; | ||
DROP INDEX sessions_identity_id_nid_sorted_idx ON sessions; | ||
DROP INDEX sessions_nid_created_at_id_idx ON sessions; |
11 changes: 11 additions & 0 deletions
11
...ns/sql/20241023142500000003_drop_unused_indices_credential_identifiers.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 @@ | ||
-- THIS IS COCKROACH ONLY | ||
ALTER INDEX identity_credential_identifiers_identifier_nid_type_uq_idx RENAME TO identity_credential_identifiers_identifier_nid_type_uq_idx_deleteme; | ||
CREATE UNIQUE INDEX IF NOT EXISTS identity_credential_identifiers_identifier_nid_type_uq_idx ON identity_credential_identifiers(nid ASC, identity_credential_type_id ASC, identifier ASC); | ||
DROP INDEX IF EXISTS identity_credential_identifiers_identifier_nid_type_uq_idx_deleteme; | ||
-- | ||
|
||
CREATE INDEX IF NOT EXISTS identity_credential_identifiers_nid_id_idx ON identity_credentials_identifiers (nid ASC, id ASC); | ||
CREATE INDEX IF NOT EXISTS identity_credential_identifiers_id_nid_idx ON identity_credentials_identifiers (id ASC, nid ASC); | ||
CREATE INDEX IF NOT EXISTS identity_credential_identifiers_nid_identity_credential_id_idx ON identity_credentials_identifiers (identity_credential_id ASC, nid ASC); | ||
|
||
DROP INDEX IF EXISTS identity_credential_identifiers_identity_credential_id_idx; |
11 changes: 11 additions & 0 deletions
11
...ions/sql/20241023142500000003_drop_unused_indices_credential_identifiers.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 @@ | ||
-- THIS IS COCKROACH ONLY | ||
ALTER INDEX identity_credential_identifiers_identifier_nid_type_uq_idx RENAME TO identity_credential_identifiers_identifier_nid_type_uq_idx_deleteme; | ||
CREATE UNIQUE INDEX IF NOT EXISTS 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 IF EXISTS identity_credential_identifiers_identifier_nid_type_uq_idx_deleteme; | ||
-- | ||
|
||
CREATE INDEX IF NOT EXISTS identity_credential_identifiers_identity_credential_id_idx ON identity_credential_identifiers (identity_credential_id ASC); | ||
|
||
DROP INDEX IF EXISTS identity_credential_identifiers_nid_id_idx; | ||
DROP INDEX IF EXISTS identity_credential_identifiers_id_nid_idx; | ||
DROP INDEX IF EXISTS identity_credential_identifiers_nid_identity_credential_id_idx; |
9 changes: 4 additions & 5 deletions
9
...l/migrations/sql/20241023142500000003_drop_unused_indices_credential_identifiers.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 |
---|---|---|
@@ -1,6 +1,5 @@ | ||
DROP INDEX identity_credential_identifiers_nid_i_ici_v2_idx; | ||
CREATE INDEX IF NOT EXISTS identity_credential_identifiers_nid_id_idx ON identity_credential_identifiers (nid ASC, id ASC); | ||
CREATE INDEX IF NOT EXISTS identity_credential_identifiers_id_nid_idx ON identity_credential_identifiers (id ASC, nid ASC); | ||
CREATE INDEX IF NOT EXISTS identity_credential_identifiers_nid_identity_credential_id_idx ON identity_credential_identifiers (identity_credential_id ASC, nid ASC); | ||
|
||
CREATE INDEX identity_credential_identifiers_nid_identity_credential_id_idx ON identity_credential_identifiers (identity_credential_id ASC, nid ASC); | ||
CREATE INDEX identity_credential_identifiers_nid_i_ici_idx ON identity_credential_identifiers (nid ASC, identifier ASC, identity_credential_id ASC); | ||
CREATE INDEX identity_credential_identifiers_nid_id_idx ON identity_credential_identifiers (nid ASC, id ASC); | ||
CREATE INDEX identity_credential_identifiers_id_nid_idx ON identity_credential_identifiers (id ASC, nid ASC); | ||
DROP INDEX IF EXISTS identity_credential_identifiers_identity_credential_id_idx; |
7 changes: 3 additions & 4 deletions
7
...ations/sql/20241023142500000003_drop_unused_indices_credential_identifiers.mysql.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 |
---|---|---|
@@ -1,6 +1,5 @@ | ||
DROP INDEX identity_credential_identifiers_nid_i_ici_v2_idx ON identity_credential_identifiers; | ||
|
||
CREATE INDEX identity_credential_identifiers_nid_identity_credential_id_idx ON identity_credential_identifiers (identity_credential_id ASC, nid ASC); | ||
CREATE INDEX identity_credential_identifiers_nid_i_ici_idx ON identity_credential_identifiers (nid ASC, identifier ASC, identity_credential_id ASC); | ||
CREATE INDEX identity_credential_identifiers_nid_id_idx ON identity_credential_identifiers (nid ASC, id ASC); | ||
CREATE INDEX identity_credential_identifiers_id_nid_idx ON identity_credential_identifiers (id ASC, nid ASC); | ||
CREATE INDEX identity_credential_identifiers_nid_identity_credential_id_idx ON identity_credential_identifiers (identity_credential_id ASC, nid ASC); | ||
|
||
DROP INDEX identity_credential_identifiers_identity_credential_id_idx ON identity_credential_identifiers; |
5 changes: 2 additions & 3 deletions
5
...grations/sql/20241023142500000003_drop_unused_indices_credential_identifiers.mysql.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 |
---|---|---|
@@ -1,6 +1,5 @@ | ||
CREATE INDEX identity_credential_identifiers_nid_i_ici_v2_idx ON sessions (identity_credential_id ASC, nid ASC, identifier ASC); | ||
CREATE INDEX identity_credential_identifiers_identity_credential_id_idx ON identity_credential_identifiers (identity_credential_id ASC); | ||
|
||
DROP INDEX identity_credential_identifiers_nid_identity_credential_id_idx ON identity_credential_identifiers; | ||
DROP INDEX identity_credential_identifiers_nid_i_ici_idx ON identity_credential_identifiers; | ||
DROP INDEX identity_credential_identifiers_nid_id_idx ON identity_credential_identifiers; | ||
DROP INDEX identity_credential_identifiers_id_nid_idx ON identity_credential_identifiers; | ||
DROP INDEX identity_credential_identifiers_nid_identity_credential_id_idx ON identity_credential_identifiers; |
9 changes: 4 additions & 5 deletions
9
...sql/migrations/sql/20241023142500000003_drop_unused_indices_credential_identifiers.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 |
---|---|---|
@@ -1,6 +1,5 @@ | ||
CREATE INDEX identity_credential_identifiers_nid_i_ici_v2_idx ON sessions (identity_credential_id ASC, nid ASC, identifier ASC); | ||
CREATE INDEX IF NOT EXISTS identity_credential_identifiers_identity_credential_id_idx ON identity_credential_identifiers (identity_credential_id ASC); | ||
|
||
DROP INDEX identity_credential_identifiers_nid_identity_credential_id_idx; | ||
DROP INDEX identity_credential_identifiers_nid_i_ici_idx; | ||
DROP INDEX identity_credential_identifiers_nid_id_idx; | ||
DROP INDEX identity_credential_identifiers_id_nid_idx; | ||
DROP INDEX IF EXISTS identity_credential_identifiers_nid_id_idx; | ||
DROP INDEX IF EXISTS identity_credential_identifiers_id_nid_idx; | ||
DROP INDEX IF EXISTS identity_credential_identifiers_nid_identity_credential_id_idx; |