-
Notifications
You must be signed in to change notification settings - Fork 2
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
Showing
10 changed files
with
150 additions
and
141 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
...s/2023-10-05-193438_create_posts/down.sql → ...s/2023-10-11-230102_create_posts/down.sql
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,2 +1,2 @@ | ||
-- This file should undo anything in `up.sql` | ||
DROP TABLE IF EXISTS public.storage; | ||
DROP TABLE IF EXISTS public.future_entry; |
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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
-- Your SQL goes here | ||
CREATE TABLE IF NOT EXISTS public.future_entry | ||
( | ||
network character varying(255) COLLATE pg_catalog."default", | ||
pair_id character varying(255) COLLATE pg_catalog."default", | ||
data_id character varying(255) COLLATE pg_catalog."default", | ||
block_hash character varying(255) COLLATE pg_catalog."default", | ||
block_number bigint, | ||
block_timestamp timestamp without time zone, | ||
transaction_hash character varying(255) COLLATE pg_catalog."default", | ||
price numeric, | ||
"timestamp" timestamp without time zone, | ||
publisher character varying(255) COLLATE pg_catalog."default", | ||
source character varying(255) COLLATE pg_catalog."default", | ||
volume numeric, | ||
expiration_timestamp timestamp without time zone, | ||
_cursor bigint | ||
) | ||
|
||
TABLESPACE pg_default; | ||
|
||
ALTER TABLE IF EXISTS public.future_entry | ||
OWNER to postgres; | ||
|
||
REVOKE ALL ON TABLE public.future_entry FROM indexed_data_read_only; | ||
|
||
GRANT SELECT ON TABLE public.future_entry TO indexed_data_read_only; | ||
|
||
GRANT ALL ON TABLE public.future_entry TO postgres; | ||
-- Index: future_entry_pair_id_publisher_source_timestamp_index | ||
|
||
-- DROP INDEX IF EXISTS public.future_entry_pair_id_publisher_source_timestamp_index; | ||
|
||
CREATE INDEX IF NOT EXISTS future_entry_pair_id_publisher_source_timestamp_index | ||
ON public.future_entry USING btree | ||
(pair_id COLLATE pg_catalog."default" ASC NULLS LAST, publisher COLLATE pg_catalog."default" ASC NULLS LAST, source COLLATE pg_catalog."default" ASC NULLS LAST, "timestamp" ASC NULLS LAST) | ||
TABLESPACE pg_default; |
Oops, something went wrong.