Drop index on key metadata table

Key metadata can exist without a keyring in the table, so we don't lose
it on reinsertion.

Also, don't use transactions inside database upgrade tasks. The entire
update is wrapped in a transaction, and we don't want to break this!
This commit is contained in:
Vincent Breitmoser
2019-06-27 19:24:52 +02:00
parent 865b35d79f
commit 6cb773c45d
2 changed files with 59 additions and 67 deletions

View File

@@ -1,11 +1,12 @@
import java.lang.Boolean;
import java.util.Date;
-- NOTE: This table's data is NOT bound to keyrings_public! There may be
-- entries here that no longer have a corresponding key in the database!
CREATE TABLE IF NOT EXISTS key_metadata (
master_key_id INTEGER PRIMARY KEY,
last_updated INTEGER AS Date,
seen_on_keyservers INTEGER AS Boolean,
FOREIGN KEY(master_key_id) REFERENCES keyrings_public(master_key_id) ON DELETE CASCADE
seen_on_keyservers INTEGER AS Boolean
);
selectByMasterKeyId: