Stop creating unecessary index in notification store (#14042)

* Stop creating unecessary index in notification store

* add comment
This commit is contained in:
Matt Hauff 2022-12-02 11:46:25 -07:00 committed by GitHub
parent 3ee128cf47
commit b39ec76d9f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -44,7 +44,9 @@ class NotificationStore:
"CREATE TABLE IF NOT EXISTS notifications(" "coin_id blob PRIMARY KEY," "msg blob," "amount blob" ")"
)
await conn.execute("CREATE INDEX IF NOT EXISTS coin_id_index on notifications(coin_id)")
# This used to be an accidentally created redundant index on coin_id which is already a primary key
# We can remove this at some point in the future when it's unlikely this index still exists
await conn.execute("DROP INDEX IF EXISTS coin_id_index")
return self