-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4682e05
commit b80842f
Showing
1 changed file
with
7 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,25 @@ | ||
SET check_function_bodies = false; | ||
|
||
CREATE TABLE public.indexer_log_entries ( | ||
id uuid DEFAULT gen_random_uuid() NOT NULL, | ||
function_name text NOT NULL, | ||
block_height numeric NOT NULL, | ||
"timestamp" timestamp without time zone DEFAULT CURRENT_TIMESTAMP, | ||
message text | ||
); | ||
|
||
CREATE TABLE public.indexer_state ( | ||
function_name character varying NOT NULL, | ||
current_block_height numeric(21,0) NOT NULL, | ||
status text, | ||
current_historical_block_height numeric(21,0) | ||
); | ||
|
||
ALTER TABLE ONLY public.indexer_log_entries | ||
ADD CONSTRAINT indexer_log_entries_pkey PRIMARY KEY (id); | ||
|
||
ALTER TABLE ONLY public.indexer_state | ||
ADD CONSTRAINT indexer_state_pkey PRIMARY KEY (function_name); | ||
|
||
CREATE INDEX idx_function_name ON indexer_log_entries(function_name); | ||
CREATE INDEX idx_timestamp ON indexer_log_entries("timestamp"); |