Skip to content

Commit

Permalink
Update schema version and add index to schema update script.
Browse files Browse the repository at this point in the history
  • Loading branch information
paramsingh committed Jun 25, 2018
1 parent 12cb198 commit f3f1a33
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion admin/sql/updates/2018-06-22-spotify-listen-importer.sql
Expand Up @@ -12,7 +12,7 @@ CREATE TABLE spotify_auth (
);

ALTER TABLE spotify_auth ADD CONSTRAINT spotify_auth_user_id_foreign_key FOREIGN KEY (user_id) REFERENCES "user" (id);

ALTER TABLE spotify_auth ADD CONSTRAINT spotify_auth_pkey PRIMARY KEY (user_id);
CREATE INDEX latest_listened_at_spotify_auth ON spotify_auth (latest_listened_at DESC NULLS LAST);

COMMIT;
2 changes: 1 addition & 1 deletion listenbrainz/db/__init__.py
Expand Up @@ -6,7 +6,7 @@
import psycopg2

# This value must be incremented after schema changes on replicated tables!
SCHEMA_VERSION = 3
SCHEMA_VERSION = 4

engine = None

Expand Down

0 comments on commit f3f1a33

Please sign in to comment.