fix insertion of data into KeySignature table

This commit is contained in:
Vincent Breitmoser
2018-07-14 12:03:44 +02:00
parent 9df9682c77
commit a69eaab0ea
3 changed files with 4 additions and 3 deletions

View File

@@ -57,6 +57,8 @@ public class DatabaseBatchInteractor {
} else if (op.keySignature != null) { } else if (op.keySignature != null) {
op.keySignature.bindTo(insertKeySignerStatement); op.keySignature.bindTo(insertKeySignerStatement);
insertKeySignerStatement.executeInsert(); insertKeySignerStatement.executeInsert();
} else {
throw new IllegalStateException();
} }
} }
} }

View File

@@ -22,6 +22,6 @@ public abstract class KeySignature implements KeySignaturesModel {
} }
public static KeySignature create(long masterKeyId, long certId) { public static KeySignature create(long masterKeyId, long certId) {
return null; return new AutoValue_KeySignature(masterKeyId, certId);
} }
} }

View File

@@ -12,8 +12,7 @@ CREATE TABLE IF NOT EXISTS user_packets(
is_primary INTEGER AS Boolean NOT NULL, is_primary INTEGER AS Boolean NOT NULL,
is_revoked INTEGER AS Boolean NOT NULL, is_revoked INTEGER AS Boolean NOT NULL,
PRIMARY KEY(master_key_id, rank), PRIMARY KEY(master_key_id, rank),
FOREIGN KEY(master_key_id) REFERENCES FOREIGN KEY(master_key_id) REFERENCES keyrings_public(master_key_id) ON DELETE CASCADE
keyrings_public(master_key_id) ON DELETE CASCADE
); );
insertUserPacket: insertUserPacket: