Add index to image lookup database tables

This commit is contained in:
JonnyWong16 2020-04-30 17:44:27 -07:00
commit 031bef8c02
No known key found for this signature in database
GPG key ID: B1F1F9807184697A

View file

@ -2110,6 +2110,15 @@ def dbcheck():
c_db.execute(
'CREATE UNIQUE INDEX IF NOT EXISTS idx_musicbrainz_lookup ON musicbrainz_lookup (rating_key)'
)
c_db.execute(
'CREATE UNIQUE INDEX IF NOT EXISTS idx_image_hash_lookup ON image_hash_lookup (img_hash)'
)
c_db.execute(
'CREATE UNIQUE INDEX IF NOT EXISTS idx_cloudinary_lookup ON cloudinary_lookup (img_hash)'
)
c_db.execute(
'CREATE UNIQUE INDEX IF NOT EXISTS idx_imgur_lookup ON imgur_lookup (img_hash)'
)
conn_db.commit()
c_db.close()