database: added keys migration, get/insert, insert keys at launch if none are present

This commit is contained in:
Philippe Loctaux 2023-03-12 18:45:55 +01:00
parent 7f11016a34
commit 8c37fc1181
15 changed files with 453 additions and 2 deletions

View file

@ -0,0 +1 @@
drop table if exists keys;

View file

@ -0,0 +1,8 @@
create table if not exists keys
(
id TEXT not null primary key,
created_at TEXT not null default CURRENT_TIMESTAMP,
revoked_at TEXT,
private_der BLOB not null,
public_der BLOB not null
);