Skip to content

Commit 810ba7d

Browse files
committed
Update 'signed_entity' migration
1 parent 67f4266 commit 810ba7d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

mithril-aggregator/src/database/migration.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@ create table signed_entity (
199199
signed_entity_id text not null,
200200
signed_entity_type_id integer not null,
201201
certificate_id text not null,
202+
beacon json not null,
202203
entity json not null,
203204
created_at text not null default current_timestamp,
204205
primary key (signed_entity_id)
@@ -208,12 +209,14 @@ create table signed_entity (
208209
create table if not exists snapshot (key_hash text primary key, key json not null, value json not null);
209210
insert into signed_entity (signed_entity_id,
210211
signed_entity_type_id,
211-
certificate_id,
212+
certificate_id,
213+
beacon,
212214
entity)
213215
select
214216
json_extract(snapshot.value, '$.digest') as signed_entity_id,
215217
2 as signed_entity_type_id,
216218
json_extract(snapshot.value, '$.certificate_hash') as certificate_id,
219+
json_extract(snapshot.value, '$.beacon') as beacon,
217220
snapshot.value as entity
218221
from snapshot
219222
order by ROWID asc;

0 commit comments

Comments
 (0)