Skip to content

Commit

Permalink
preseed last witness table
Browse files Browse the repository at this point in the history
  • Loading branch information
andymck committed Jan 15, 2024
1 parent 83386d4 commit 8819867
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions iot_verifier/migrations/14_last_witness.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@ create table last_witness (
id bytea primary key not null,
timestamp timestamptz not null
);
-- seed last_witness with timestamps from last_beacon
insert into last_witness (id, timestamp)
select id, timestamp from last_beacon
where timestamp > now() - interval '7 day';

0 comments on commit 8819867

Please sign in to comment.