Skip to content

Commit

Permalink
fix: create index on contact id for profile tables
Browse files Browse the repository at this point in the history
  • Loading branch information
MishkaRogachev committed Nov 9, 2023
1 parent e285046 commit ca09eb0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 4 additions & 4 deletions protocol/migrations/migrations.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ CREATE TABLE profile_showcase_communities_contacts (
contact_id TEXT NOT NULL,
PRIMARY KEY (contact_id, community_id)
);
CREATE INDEX profile_showcase_communities_contact_id ON profile_showcase_communities_contacts (contact_id);

CREATE TABLE profile_showcase_accounts_contacts (
address TEXT NOT NULL,
Expand All @@ -46,17 +47,20 @@ CREATE TABLE profile_showcase_accounts_contacts (
contact_id TEXT NOT NULL,
PRIMARY KEY (contact_id, address)
);
CREATE INDEX profile_showcase_accounts_contact_id ON profile_showcase_accounts_contacts (contact_id);

CREATE TABLE profile_showcase_collectibles_contacts (
uid TEXT NOT NULL,
sort_order INT DEFAULT 0,
contact_id TEXT NOT NULL,
PRIMARY KEY (contact_id, uid)
);
CREATE INDEX profile_showcase_collectibles_contact_id ON profile_showcase_collectibles_contacts (contact_id);

CREATE TABLE profile_showcase_assets_contacts (
symbol TEXT NOT NULL,
sort_order INT DEFAULT 0,
contact_id TEXT NOT NULL,
PRIMARY KEY (contact_id, symbol)
);
CREATE INDEX profile_showcase_assets_contact_id ON profile_showcase_assets_contacts (contact_id);

0 comments on commit ca09eb0

Please sign in to comment.