Merge pull request #40 from vulcanize/release-v3.0.0

Release v3.0.0
This commit is contained in:
Ian Norden 2022-01-10 12:49:57 -06:00 committed by GitHub
commit 35a1ba7218
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 53 additions and 4 deletions

View File

@ -48,12 +48,23 @@ rollback: $(GOOSE) checkdbvars
$(GOOSE) -dir db/migrations postgres "$(CONNECT_STRING)" down
pg_dump -O -s $(CONNECT_STRING) > schema.sql
## Rollback to a select migration (id/timestamp)
.PHONY: rollback_to
rollback_to: $(GOOSE) checkmigration checkdbvars
$(GOOSE) -dir db/migrations postgres "$(CONNECT_STRING)" down-to "$(MIGRATION)"
## Rollback pre_batch_set
.PHONY: `rollback_pre_batch_set`
rollback_pre_batch_set: $(GOOSE) checkdbvars
$(GOOSE) -dir db/pre_batch_processing_migrations postgres "$(CONNECT_STRING)" down
pg_dump -O -s $(CONNECT_STRING) > schema.sql
## Rollback post_batch_set
.PHONY: rollback_post_batch_set
rollback_post_batch_set: $(GOOSE) checkdbvars
$(GOOSE) -dir db/post_batch_processing_migrations postgres "$(CONNECT_STRING)" down
pg_dump -O -s $(CONNECT_STRING) > schema.sql
## Apply the next up migration
.PHONY: migrate_up_by_one
migrate_up_by_one: $(GOOSE) checkdbvars

View File

@ -1,6 +1,6 @@
-- +goose Up
INSERT INTO public.db_version (singleton, version) VALUES (true, 'v0.3.2')
ON CONFLICT (singleton) DO UPDATE SET (version, tstamp) = ('v0.3.2', NOW());
INSERT INTO public.db_version (singleton, version) VALUES (true, 'v3.0.0')
ON CONFLICT (singleton) DO UPDATE SET (version, tstamp) = ('v3.0.0', NOW());
-- +goose Down
DELETE FROM public.db_version WHERE version = 'v0.3.2';
DELETE FROM public.db_version WHERE version = 'v3.0.0';

View File

@ -0,0 +1,8 @@
-- +goose Up
INSERT INTO public.db_version (singleton, version) VALUES (true, 'v3.0.0')
ON CONFLICT (singleton) DO UPDATE SET (version, tstamp) = ('v3.0.0', NOW());
-- +goose Down
DELETE FROM public.db_version WHERE version = 'v3.0.0';
INSERT INTO public.db_version (singleton, version) VALUES (true, 'v0.3.2')
ON CONFLICT (singleton) DO UPDATE SET (version, tstamp) = ('v0.3.2', NOW());

View File

@ -0,0 +1,15 @@
-- +goose Up
CREATE INDEX log_mh_index_index ON eth.log_cids USING btree (leaf_mh_key);
CREATE INDEX block_number_index ON eth.header_cids USING brin (block_number);
CREATE INDEX header_hash_index ON eth.header_cids USING btree (block_hash);
CREATE INDEX tx_header_hash_index ON eth.transaction_cids USING btree (header_id);
CREATE INDEX transaction_hash_index ON eth.transaction_cids USING btree (tx_hash);
CREATE INDEX log_tx_hash_index ON eth.log_cids USING btree (rct_id);
-- +goose Down
DROP INDEX eth.log_tx_hash_index;
DROP INDEX eth.transaction_hash_index;
DROP INDEX eth.tx_header_hash_index;
DROP INDEX eth.header_hash_index;
DROP INDEX eth.block_number_index;
DROP INDEX eth.log_mh_index_index;

View File

@ -0,0 +1,15 @@
-- +goose Up
DROP INDEX eth.log_tx_hash_index;
DROP INDEX eth.transaction_hash_index;
DROP INDEX eth.tx_header_hash_index;
DROP INDEX eth.header_hash_index;
DROP INDEX eth.block_number_index;
DROP INDEX eth.log_mh_index_index;
-- +goose Down
CREATE INDEX log_mh_index_index ON eth.log_cids USING btree (leaf_mh_key);
CREATE INDEX block_number_index ON eth.header_cids USING brin (block_number);
CREATE INDEX header_hash_index ON eth.header_cids USING btree (block_hash);
CREATE INDEX tx_header_hash_index ON eth.transaction_cids USING btree (header_id);
CREATE INDEX transaction_hash_index ON eth.transaction_cids USING btree (tx_hash);
CREATE INDEX log_tx_hash_index ON eth.log_cids USING btree (rct_id);