Schemas and utils for IPLD ETH Postgres database
Go to file
Abdul Rabbani 646963f699 Update the Schema for proper types
The main changes are:
* Use proper types instead of 2 generic types.
* Use `block_root` as the primary key instead of `slot`.
* Create new tables where needed.
2022-04-19 14:33:40 -04:00
.github/workflows Compare Up and Down Migration. 2021-10-13 13:09:58 +05:30
db Update the Schema for proper types 2022-04-19 14:33:40 -04:00
scripts Compare Up and Down Migration. 2021-10-13 13:09:58 +05:30
.gitignore database uml 2021-08-29 14:00:39 -05:00
docker-compose.test.yml Upgrade statediff image to v0.9.0. 2021-10-08 18:36:21 +05:30
docker-compose.yml Compare Up and Down Migration. 2021-10-13 13:09:58 +05:30
Dockerfile Fix docker image. 2021-10-09 16:43:16 +05:30
LICENSE Initial commit 2021-05-13 17:14:05 -05:00
Makefile Remove GO111MODULE flag when installing goose in makefile 2022-03-21 17:07:46 +05:30
README.md Update the Schema for proper types 2022-04-19 14:33:40 -04:00
schema.sql update the pre- and post- batch sets with new meta schema and tables 2022-03-31 12:45:27 -05:00
vulcanize_db.png updated uml 2021-12-27 11:41:30 -06:00
vulcanize_db.uml updated uml 2021-12-27 11:41:30 -06:00

ipld-eth-db

Schemas and utils for IPLD ETH Postgres database

Database UML

Updating the DB

Please utilize the following as a reference when creating a DB schema.

  • VARCHAR(66) for "0x" prefixed 32 byte (64 nibble + 2 nibbles for "0x") hashes.
  • BIGINTs for big ints that can't fit in INT but don't need NUMERIC's capacity.
  • NUMERIC for ints that can only fit in NUMERIC.
  • INTs for ints small enough to fit in them.
  • BYTEA for columns that are non-hex-encoded byte strings.
  • TEXT or TINYTEXT for variable length strings (hex or otherwise).