Upgrade statediff image to v0.9.0.

This commit is contained in:
Arijit Das 2021-10-08 18:33:37 +05:30
parent c89a73f738
commit 1db8a682df
5 changed files with 10 additions and 10 deletions

View File

@ -33,7 +33,7 @@ jobs:
sleep 10
docker run --rm --network host -e DATABASE_USER=vdbm -e DATABASE_PASSWORD=password \
-e DATABASE_HOSTNAME=127.0.0.1 -e DATABASE_PORT=8066 -e DATABASE_NAME=vulcanize_testing \
vulcanize/statediff-migrations:v0.8.0
vulcanize/statediff-migrations:v0.9.0
- name: Verify schema is latest
run: |
PGPASSWORD="password" pg_dump -h localhost -p 8066 -U vdbm vulcanize_testing --no-owner --schema-only > ./db/migration_schema.sql

View File

@ -78,7 +78,7 @@ BEGIN
-- if none of the headers had children, none is more canonical than the other
IF has_children_count = 0 THEN
-- return the first one selected
SELECT * INTO canonical_header FROM unnest(headers) LIMIT 1;
SELECT * INTO canonical_header FROM unnest(headers) LIMIT 1;
-- if only one header had children, it can be considered the heaviest/canonical header of the set
ELSIF has_children_count = 1 THEN
-- return the only header with a child

View File

@ -1,11 +1,11 @@
-- +goose Up
CREATE TABLE eth.access_list_element (
id SERIAL PRIMARY KEY,
tx_id INTEGER NOT NULL REFERENCES eth.transaction_cids (id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED,
index INTEGER NOT NULL,
address VARCHAR(66),
storage_keys VARCHAR(66)[],
UNIQUE (tx_id, index)
id SERIAL PRIMARY KEY,
tx_id INTEGER NOT NULL REFERENCES eth.transaction_cids (id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED,
index INTEGER NOT NULL,
address VARCHAR(66),
storage_keys VARCHAR(66)[],
UNIQUE (tx_id, index)
);
CREATE INDEX accesss_list_element_address_index ON eth.access_list_element USING btree (address);

View File

@ -5,7 +5,7 @@ services:
restart: on-failure
depends_on:
- test-db
image: vulcanize/statediff-migrations:v0.8.0
image: vulcanize/statediff-migrations:v0.9.0
test-db:
restart: always

View File

@ -134,7 +134,7 @@ BEGIN
-- if none of the headers had children, none is more canonical than the other
IF has_children_count = 0 THEN
-- return the first one selected
SELECT * INTO canonical_header FROM unnest(headers) LIMIT 1;
SELECT * INTO canonical_header FROM unnest(headers) LIMIT 1;
-- if only one header had children, it can be considered the heaviest/canonical header of the set
ELSIF has_children_count = 1 THEN
-- return the only header with a child