database: added keys migration, get/insert, insert keys at launch if none are present
This commit is contained in:
parent
7f11016a34
commit
8c37fc1181
15 changed files with 453 additions and 2 deletions
1
crates/database/migrations/20230312153840_keys.down.sql
Normal file
1
crates/database/migrations/20230312153840_keys.down.sql
Normal file
|
|
@ -0,0 +1 @@
|
|||
drop table if exists keys;
|
||||
8
crates/database/migrations/20230312153840_keys.up.sql
Normal file
8
crates/database/migrations/20230312153840_keys.up.sql
Normal 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
|
||||
);
|
||||
Loading…
Add table
Add a link
Reference in a new issue