Browse Source

db: create indicies for quicker query

master
Peter Cai 2 years ago
parent
commit
fb7beff3e0
No known key found for this signature in database
GPG Key ID: 71F5FB4E4F3FD54F
  1. 3
      migrations/2020-02-22-110735_initial_indices/down.sql
  2. 3
      migrations/2020-02-22-110735_initial_indices/up.sql

3
migrations/2020-02-22-110735_initial_indices/down.sql

@ -0,0 +1,3 @@
DROP INDEX index_user_email_20200222110735;
DROP INDEX index_item_uuid_owner_20200222110735;
DROP INDEX index_token_uid_20200222110735;

3
migrations/2020-02-22-110735_initial_indices/up.sql

@ -0,0 +1,3 @@
CREATE INDEX index_user_email_20200222110735 ON users(email);
CREATE INDEX index_item_uuid_owner_20200222110735 ON items(uuid, owner);
CREATE INDEX index_token_uid_20200222110735 ON tokens(uid);
Loading…
Cancel
Save