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) {
op.keySignature.bindTo(insertKeySignerStatement);
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) {
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_revoked INTEGER AS Boolean NOT NULL,
PRIMARY KEY(master_key_id, rank),
FOREIGN KEY(master_key_id) REFERENCES
keyrings_public(master_key_id) ON DELETE CASCADE
FOREIGN KEY(master_key_id) REFERENCES keyrings_public(master_key_id) ON DELETE CASCADE
);
insertUserPacket: