Skip to content

Commit

Permalink
chore: synchronize workspaces
Browse files Browse the repository at this point in the history
  • Loading branch information
aeneasr committed Oct 28, 2024
1 parent 9ea0816 commit e8a327d
Show file tree
Hide file tree
Showing 13 changed files with 78 additions and 37 deletions.
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;

0 comments on commit e8a327d

Please sign in to comment.