From 2c5ddd03ba836272dcdd483d6c961a3a5188aee3 Mon Sep 17 00:00:00 2001 From: Ian Norden Date: Mon, 25 Feb 2019 03:33:05 -0600 Subject: [PATCH] core repo migrations in fixed form --- .gitignore | 2 +- .travis.yml | 1 - README.md | 38 +++++++++++-------- cmd/composeAndExecute.go | 22 ++++++----- ...able.sql => 00001_create_blocks_table.sql} | 0 ...ks.sql => 00002_add_columns_to_blocks.sql} | 0 ...ql => 00003_initial_transaction_table.sql} | 0 ...ql => 00004_add_primary_key_to_blocks.sql} | 0 ...=> 00005_add_block_id_to_transactions.sql} | 0 ...ck_index.sql => 00006_add_block_index.sql} | 0 ...lumns.sql => 00007_add_blocks_columns.sql} | 0 ...able.sql => 00008_add_contracts_table.sql} | 0 ...sql => 00009_add_from_to_transactions.sql} | 0 ...=> 00010_add_abi_to_watched_contracts.sql} | 0 ...es_table.sql => 00011_add_nodes_table.sql} | 0 ...ks.sql => 00012_add_node_fk_to_blocks.sql} | 0 ..._hash_constraint_to_watched_contracts.sql} | 0 ...ogs_table.sql => 00014_add_logs_table.sql} | 0 ...15_add_cascade_delete_to_transactions.sql} | 0 ...=> 00016_add_cascade_delete_to_blocks.sql} | 0 ...s.sql => 00017_add_is_final_to_blocks.sql} | 0 ...018_add_unique_constraint_blocks_node.sql} | 0 ..._block_id_index_on_transactions_table.sql} | 0 ...020_add_node_id_index_on_blocks_table.sql} | 0 ..._tx_to_index.sql => 00021_tx_to_index.sql} | 0 ...from_index.sql => 00022_tx_from_index.sql} | 0 ...3404_add_miner.sql => 00023_add_miner.sql} | 0 ...xtra_data.sql => 00024_add_extra_data.sql} | 0 ...> 00025_add_block_reward_uncle_reward.sql} | 0 ... 00026_add_data_input_to_transactions.sql} | 0 ...le.sql => 00027_create_receipts_table.sql} | 0 ..._add_transaction_id_index_to_receipts.sql} | 0 ..._node.sql => 00029_add_fields_to_node.sql} | 0 ..._index.sql => 00030_update_node_index.sql} | 0 ...nt.sql => 00031_add_log_fk_constraint.sql} | 0 ..._filters.sql => 00032_add_log_filters.sql} | 0 ...s.sql => 00033_add_watched_event_logs.sql} | 0 ...ql => 00034_update_gas_limit_gas_used.sql} | 0 ...mns.sql => 00035_rename_block_columns.sql} | 0 ...es.sql => 00036_update_tx_table_names.sql} | 0 ...pdate_log_filters_to_block_constraint.sql} | 0 ...types.sql => 00038_update_eth18_types.sql} | 0 ..._table.sql => 00039_rename_node_table.sql} | 0 ... 00040_associate_receipts_with_blocks.sql} | 0 ...41_add_eth_node_fingerprint_to_blocks.sql} | 0 ...ql => 00042_create_token_supply_table.sql} | 0 ...ble.sql => 00043_create_headers_table.sql} | 0 ...=> 00044_create_checked_headers_table.sql} | 0 ...ge.sql => 00045_create_queued_storage.sql} | 0 49 files changed, 36 insertions(+), 27 deletions(-) rename db/migrations/{20171025165407_create_blocks_table.sql => 00001_create_blocks_table.sql} (100%) rename db/migrations/{20171025230205_add_columns_to_blocks.sql => 00002_add_columns_to_blocks.sql} (100%) rename db/migrations/{20171027174929_initial_transaction_table.sql => 00003_initial_transaction_table.sql} (100%) rename db/migrations/{20171030203101_add_primary_key_to_blocks.sql => 00004_add_primary_key_to_blocks.sql} (100%) rename db/migrations/{20171031153007_add_block_id_to_transactions.sql => 00005_add_block_id_to_transactions.sql} (100%) rename db/migrations/{20171031221128_add_block_index.sql => 00006_add_block_index.sql} (100%) rename db/migrations/{20171102153801_add_blocks_columns.sql => 00007_add_blocks_columns.sql} (100%) rename db/migrations/{20171109210008_add_contracts_table.sql => 00008_add_contracts_table.sql} (100%) rename db/migrations/{20171109222835_add_from_to_transactions.sql => 00009_add_from_to_transactions.sql} (100%) rename db/migrations/{20171204205233_add_abi_to_watched_contracts.sql => 00010_add_abi_to_watched_contracts.sql} (100%) rename db/migrations/{20171205210118_add_nodes_table.sql => 00011_add_nodes_table.sql} (100%) rename db/migrations/{20171205215440_add_node_fk_to_blocks.sql => 00012_add_node_fk_to_blocks.sql} (100%) rename db/migrations/{20171206221647_add_contract_hash_constraint_to_watched_contracts.sql => 00013_add_contract_hash_constraint_to_watched_contracts.sql} (100%) rename db/migrations/{20171211230553_add_logs_table.sql => 00014_add_logs_table.sql} (100%) rename db/migrations/{20171213201926_add_cascade_delete_to_transactions.sql => 00015_add_cascade_delete_to_transactions.sql} (100%) rename db/migrations/{20171214192609_add_cascade_delete_to_blocks.sql => 00016_add_cascade_delete_to_blocks.sql} (100%) rename db/migrations/{20171218170356_add_is_final_to_blocks.sql => 00017_add_is_final_to_blocks.sql} (100%) rename db/migrations/{20171220154505_add_unique_constraint_blocks_node.sql => 00018_add_unique_constraint_blocks_node.sql} (100%) rename db/migrations/{20171220162655_add_block_id_index_on_transactions_table.sql => 00019_add_block_id_index_on_transactions_table.sql} (100%) rename db/migrations/{20171220163224_add_node_id_index_on_blocks_table.sql => 00020_add_node_id_index_on_blocks_table.sql} (100%) rename db/migrations/{20171220222456_tx_to_index.sql => 00021_tx_to_index.sql} (100%) rename db/migrations/{20171220222500_tx_from_index.sql => 00022_tx_from_index.sql} (100%) rename db/migrations/{20171227173404_add_miner.sql => 00023_add_miner.sql} (100%) rename db/migrations/{20171227185710_add_extra_data.sql => 00024_add_extra_data.sql} (100%) rename db/migrations/{20171228164704_add_block_reward_uncle_reward.sql => 00025_add_block_reward_uncle_reward.sql} (100%) rename db/migrations/{20171229000441_add_data_input_to_transactions.sql => 00026_add_data_input_to_transactions.sql} (100%) rename db/migrations/{20171229172818_create_receipts_table.sql => 00027_create_receipts_table.sql} (100%) rename db/migrations/{20180102233005_add_transaction_id_index_to_receipts.sql => 00028_add_transaction_id_index_to_receipts.sql} (100%) rename db/migrations/{20180110203941_add_fields_to_node.sql => 00029_add_fields_to_node.sql} (100%) rename db/migrations/{20180110204835_update_node_index.sql => 00030_update_node_index.sql} (100%) rename db/migrations/{20180115220111_add_log_fk_constraint.sql => 00031_add_log_fk_constraint.sql} (100%) rename db/migrations/{20180122201903_add_log_filters.sql => 00032_add_log_filters.sql} (100%) rename db/migrations/{20180122213613_add_watched_event_logs.sql => 00033_add_watched_event_logs.sql} (100%) rename db/migrations/{20180202032433_update_gas_limit_gas_used.sql => 00034_update_gas_limit_gas_used.sql} (100%) rename db/migrations/{20180202213423_rename_block_columns.sql => 00035_rename_block_columns.sql} (100%) rename db/migrations/{20180202220756_update_tx_table_names.sql => 00036_update_tx_table_names.sql} (100%) rename db/migrations/{20180205191315_update_log_filters_to_block_constraint.sql => 00037_update_log_filters_to_block_constraint.sql} (100%) rename db/migrations/{20180305233813_update_eth18_types.sql => 00038_update_eth18_types.sql} (100%) rename db/migrations/{20180321150314_rename_node_table.sql => 00039_rename_node_table.sql} (100%) rename db/migrations/{20180430230941_associate_receipts_with_blocks.sql => 00040_associate_receipts_with_blocks.sql} (100%) rename db/migrations/{20180504220928_add_eth_node_fingerprint_to_blocks.sql => 00041_add_eth_node_fingerprint_to_blocks.sql} (100%) rename db/migrations/{20180606224502_create_token_supply_table.sql => 00042_create_token_supply_table.sql} (100%) rename db/migrations/{20180716182130_create_headers_table.sql => 00043_create_headers_table.sql} (100%) rename db/migrations/{20180724233837_create_checked_headers_table.sql => 00044_create_checked_headers_table.sql} (100%) rename db/migrations/{20190219134901_create_queued_storage.sql => 00045_create_queued_storage.sql} (100%) diff --git a/.gitignore b/.gitignore index 5f445b89..3436b177 100644 --- a/.gitignore +++ b/.gitignore @@ -12,4 +12,4 @@ postgraphile/build/ postgraphile/node_modules/ postgraphile/package-lock.json vulcanizedb.log -db/migrations/00*.sql +db/migrations/20*.sql diff --git a/.travis.yml b/.travis.yml index 1e6d5dfe..b58d6ee3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,7 +24,6 @@ before_install: before_script: - go get -u github.com/pressly/sup/cmd/sup - sudo -u postgres createdb vulcanize_private - - make version_migrations - make migrate NAME=vulcanize_private - bash ./scripts/start_test_chain.sh - cd postgraphile && yarn diff --git a/README.md b/README.md index c6b9a05c..6244d107 100644 --- a/README.md +++ b/README.md @@ -136,9 +136,10 @@ false If you have full rinkeby chaindata you can move it to `rinkeby_vulcanizedb_geth_data` docker volume to skip long wait of sync. ## Running the Tests +- `createdb vulcanize_private` will create the test db +- `make migrate NAME=vulcanize_private` will run the db migrations - `make test` will run the unit tests and skip the integration tests - `make integrationtest` will run the just the integration tests -- Note: requires Ganache chain setup and seeded with `flip-kick.js` and `frob.js` (in that order) ## Deploying 1. you will need to make sure you have ssh agent running and your ssh key added to it. instructions [here](https://developer.github.com/v3/guides/using-ssh-agent-forwarding/#your-key-must-be-available-to-ssh-agent) @@ -240,13 +241,23 @@ The addition of '_' after table names is to prevent collisions with reserved Pos The `composeAndExecute` command is used to compose and execute over an arbitrary set of custom transformers. This is accomplished by generating a Go pluggin which allows our `vulcanizedb` binary to link to external transformers, so long as they abide by our standard [interfaces](https://github.com/vulcanize/maker-vulcanizedb/tree/compose_and_execute/libraries/shared/transformer). + This command requires Go 1.11+ and [Go plugins](https://golang.org/pkg/plugin/) only work on Unix based systems. +#### Writing custom transformers +Storage Transformers + * [Guide](https://github.com/vulcanize/maker-vulcanizedb/blob/compose_and_execute/libraries/shared/factories/storage/README.md) + * [Example](https://github.com/vulcanize/maker-vulcanizedb/blob/compose_and_execute/libraries/shared/factories/storage/EXAMPLE.md) + +Event Transformers + * Guide + * Example + #### composeAndExecute configuration -A config location is specified when executing the command: +A .toml config file is specified when executing the command: `./vulcanizedb composeAndExecute --config=./environments/config_name.toml` -The information provided in the .toml config is used to generate the plugin: +The config provides information for composing a set of transformers: ```toml [database] @@ -262,7 +273,7 @@ The information provided in the .toml config is used to generate the plugin: [exporter] home = "github.com/vulcanize/vulcanizedb" clone = false - name = "eventTransformerExporter" + name = "exampleTransformerExporter" save = false transformerNames = [ "transformer1", @@ -306,19 +317,14 @@ our `$GOPATH` but setting this to `true` overrides that. This needs to be set to - `eth_event` indicates the transformer works with the [event watcher](https://github.com/vulcanize/maker-vulcanizedb/blob/compose_and_execute/libraries/shared/watcher/event_watcher.go) that fetches event logs from an ETH node - `migrations` is the relative path from `repository` to the db migrations directory for the transformer - -Note: If any of the imported transformers need additional -config variables do not forget to include those as well +- Note: If any of the imported transformers need additional config variables those need to be included as well -This information is used to write and build a go plugin with a transformer -set composed from the transformer imports specified in the config file -This plugin is loaded and the set of transformer initializers is exported -from it and loaded into and executed over by the appropriate watcher +This information is used to write and build a Go plugin which exports the configured transformers. +These transformers are loaded onto their specified watchers and executed. -Transformers of different types can be run together in the same command using a -single config file or in separate instances using different config files +Transformers of different types can be run together in the same command using a single config file or in separate instances using different config files -The general structure of a plugin .go file, and what we would see with the above config is shown below +The general structure of a plugin .go file, and what we would see built with the above config is shown below ```go package main @@ -354,4 +360,6 @@ that exports a variable `TransformerInitializer` or `StorageTransformerInitializ or [StorageTransformerInitializer](https://github.com/vulcanize/maker-vulcanizedb/blob/compose_and_execute/libraries/shared/transformer/storage_transformer.go#L31), respectively * design the transformers to work in the context of their [event](https://github.com/vulcanize/maker-vulcanizedb/blob/compose_and_execute/libraries/shared/watcher/event_watcher.go#L83) or [storage](https://github.com/vulcanize/maker-vulcanizedb/blob/compose_and_execute/libraries/shared/watcher/storage_watcher.go#L53) watchers -* create db migrations to run against vulcanizeDB so that we can store the transformed data +* create db migrations to run against vulcanizeDB so that we can store the transformer output + * specify migration locations for each transformer in the config with the `exporter.transformer.migrations` fields + * do not `goose fix` the transformer migrations diff --git a/cmd/composeAndExecute.go b/cmd/composeAndExecute.go index 5b15ed8a..e18cb010 100644 --- a/cmd/composeAndExecute.go +++ b/cmd/composeAndExecute.go @@ -44,17 +44,19 @@ var composeAndExecuteCmd = &cobra.Command{ Long: `This command needs a config .toml file of form: [database] - name = "vulcanize_public" + name = "vulcanize_public" hostname = "localhost" - user = "vulcanize" + user = "vulcanize" password = "vulcanize" - port = 5432 + port = 5432 [client] - ipcPath = "http://kovan0.vulcanize.io:8545" + ipcPath = "http://kovan0.vulcanize.io:8545" [exporter] - name = "exampleTransformerExporter" + home = "github.com/vulcanize/vulcanizedb" + clone = false + name = "exampleTransformerExporter" save = false transformerNames = [ "transformer1", @@ -72,14 +74,14 @@ var composeAndExecuteCmd = &cobra.Command{ type = "eth_event" repository = "github.com/account/repo" migrations = "db/migrations" - [exporter.transformer3] + [exporter.transformer3] path = "path/to/transformer3" - type = "eth_storage" + type = "eth_event" repository = "github.com/account/repo" migrations = "db/migrations" - [exporter.transformer4] + [exporter.transformer4] path = "path/to/transformer4" - type = "eth_event" + type = "eth_storage" repository = "github.com/account2/repo2" migrations = "to/db/migrations" @@ -95,7 +97,7 @@ from it and loaded into and executed over by the appropriate watcher. The type of watcher that the transformer works with is specified using the type variable for each transformer in the config. Currently there are watchers of event data from an eth node (eth_event) and storage data from an eth node -(eth_storage). Soon there will be watchers for ipfs (ipfs_event and ipfs_storage). +(eth_storage). Transformers of different types can be ran together in the same command using a single config file or in separate command instances using different config files diff --git a/db/migrations/20171025165407_create_blocks_table.sql b/db/migrations/00001_create_blocks_table.sql similarity index 100% rename from db/migrations/20171025165407_create_blocks_table.sql rename to db/migrations/00001_create_blocks_table.sql diff --git a/db/migrations/20171025230205_add_columns_to_blocks.sql b/db/migrations/00002_add_columns_to_blocks.sql similarity index 100% rename from db/migrations/20171025230205_add_columns_to_blocks.sql rename to db/migrations/00002_add_columns_to_blocks.sql diff --git a/db/migrations/20171027174929_initial_transaction_table.sql b/db/migrations/00003_initial_transaction_table.sql similarity index 100% rename from db/migrations/20171027174929_initial_transaction_table.sql rename to db/migrations/00003_initial_transaction_table.sql diff --git a/db/migrations/20171030203101_add_primary_key_to_blocks.sql b/db/migrations/00004_add_primary_key_to_blocks.sql similarity index 100% rename from db/migrations/20171030203101_add_primary_key_to_blocks.sql rename to db/migrations/00004_add_primary_key_to_blocks.sql diff --git a/db/migrations/20171031153007_add_block_id_to_transactions.sql b/db/migrations/00005_add_block_id_to_transactions.sql similarity index 100% rename from db/migrations/20171031153007_add_block_id_to_transactions.sql rename to db/migrations/00005_add_block_id_to_transactions.sql diff --git a/db/migrations/20171031221128_add_block_index.sql b/db/migrations/00006_add_block_index.sql similarity index 100% rename from db/migrations/20171031221128_add_block_index.sql rename to db/migrations/00006_add_block_index.sql diff --git a/db/migrations/20171102153801_add_blocks_columns.sql b/db/migrations/00007_add_blocks_columns.sql similarity index 100% rename from db/migrations/20171102153801_add_blocks_columns.sql rename to db/migrations/00007_add_blocks_columns.sql diff --git a/db/migrations/20171109210008_add_contracts_table.sql b/db/migrations/00008_add_contracts_table.sql similarity index 100% rename from db/migrations/20171109210008_add_contracts_table.sql rename to db/migrations/00008_add_contracts_table.sql diff --git a/db/migrations/20171109222835_add_from_to_transactions.sql b/db/migrations/00009_add_from_to_transactions.sql similarity index 100% rename from db/migrations/20171109222835_add_from_to_transactions.sql rename to db/migrations/00009_add_from_to_transactions.sql diff --git a/db/migrations/20171204205233_add_abi_to_watched_contracts.sql b/db/migrations/00010_add_abi_to_watched_contracts.sql similarity index 100% rename from db/migrations/20171204205233_add_abi_to_watched_contracts.sql rename to db/migrations/00010_add_abi_to_watched_contracts.sql diff --git a/db/migrations/20171205210118_add_nodes_table.sql b/db/migrations/00011_add_nodes_table.sql similarity index 100% rename from db/migrations/20171205210118_add_nodes_table.sql rename to db/migrations/00011_add_nodes_table.sql diff --git a/db/migrations/20171205215440_add_node_fk_to_blocks.sql b/db/migrations/00012_add_node_fk_to_blocks.sql similarity index 100% rename from db/migrations/20171205215440_add_node_fk_to_blocks.sql rename to db/migrations/00012_add_node_fk_to_blocks.sql diff --git a/db/migrations/20171206221647_add_contract_hash_constraint_to_watched_contracts.sql b/db/migrations/00013_add_contract_hash_constraint_to_watched_contracts.sql similarity index 100% rename from db/migrations/20171206221647_add_contract_hash_constraint_to_watched_contracts.sql rename to db/migrations/00013_add_contract_hash_constraint_to_watched_contracts.sql diff --git a/db/migrations/20171211230553_add_logs_table.sql b/db/migrations/00014_add_logs_table.sql similarity index 100% rename from db/migrations/20171211230553_add_logs_table.sql rename to db/migrations/00014_add_logs_table.sql diff --git a/db/migrations/20171213201926_add_cascade_delete_to_transactions.sql b/db/migrations/00015_add_cascade_delete_to_transactions.sql similarity index 100% rename from db/migrations/20171213201926_add_cascade_delete_to_transactions.sql rename to db/migrations/00015_add_cascade_delete_to_transactions.sql diff --git a/db/migrations/20171214192609_add_cascade_delete_to_blocks.sql b/db/migrations/00016_add_cascade_delete_to_blocks.sql similarity index 100% rename from db/migrations/20171214192609_add_cascade_delete_to_blocks.sql rename to db/migrations/00016_add_cascade_delete_to_blocks.sql diff --git a/db/migrations/20171218170356_add_is_final_to_blocks.sql b/db/migrations/00017_add_is_final_to_blocks.sql similarity index 100% rename from db/migrations/20171218170356_add_is_final_to_blocks.sql rename to db/migrations/00017_add_is_final_to_blocks.sql diff --git a/db/migrations/20171220154505_add_unique_constraint_blocks_node.sql b/db/migrations/00018_add_unique_constraint_blocks_node.sql similarity index 100% rename from db/migrations/20171220154505_add_unique_constraint_blocks_node.sql rename to db/migrations/00018_add_unique_constraint_blocks_node.sql diff --git a/db/migrations/20171220162655_add_block_id_index_on_transactions_table.sql b/db/migrations/00019_add_block_id_index_on_transactions_table.sql similarity index 100% rename from db/migrations/20171220162655_add_block_id_index_on_transactions_table.sql rename to db/migrations/00019_add_block_id_index_on_transactions_table.sql diff --git a/db/migrations/20171220163224_add_node_id_index_on_blocks_table.sql b/db/migrations/00020_add_node_id_index_on_blocks_table.sql similarity index 100% rename from db/migrations/20171220163224_add_node_id_index_on_blocks_table.sql rename to db/migrations/00020_add_node_id_index_on_blocks_table.sql diff --git a/db/migrations/20171220222456_tx_to_index.sql b/db/migrations/00021_tx_to_index.sql similarity index 100% rename from db/migrations/20171220222456_tx_to_index.sql rename to db/migrations/00021_tx_to_index.sql diff --git a/db/migrations/20171220222500_tx_from_index.sql b/db/migrations/00022_tx_from_index.sql similarity index 100% rename from db/migrations/20171220222500_tx_from_index.sql rename to db/migrations/00022_tx_from_index.sql diff --git a/db/migrations/20171227173404_add_miner.sql b/db/migrations/00023_add_miner.sql similarity index 100% rename from db/migrations/20171227173404_add_miner.sql rename to db/migrations/00023_add_miner.sql diff --git a/db/migrations/20171227185710_add_extra_data.sql b/db/migrations/00024_add_extra_data.sql similarity index 100% rename from db/migrations/20171227185710_add_extra_data.sql rename to db/migrations/00024_add_extra_data.sql diff --git a/db/migrations/20171228164704_add_block_reward_uncle_reward.sql b/db/migrations/00025_add_block_reward_uncle_reward.sql similarity index 100% rename from db/migrations/20171228164704_add_block_reward_uncle_reward.sql rename to db/migrations/00025_add_block_reward_uncle_reward.sql diff --git a/db/migrations/20171229000441_add_data_input_to_transactions.sql b/db/migrations/00026_add_data_input_to_transactions.sql similarity index 100% rename from db/migrations/20171229000441_add_data_input_to_transactions.sql rename to db/migrations/00026_add_data_input_to_transactions.sql diff --git a/db/migrations/20171229172818_create_receipts_table.sql b/db/migrations/00027_create_receipts_table.sql similarity index 100% rename from db/migrations/20171229172818_create_receipts_table.sql rename to db/migrations/00027_create_receipts_table.sql diff --git a/db/migrations/20180102233005_add_transaction_id_index_to_receipts.sql b/db/migrations/00028_add_transaction_id_index_to_receipts.sql similarity index 100% rename from db/migrations/20180102233005_add_transaction_id_index_to_receipts.sql rename to db/migrations/00028_add_transaction_id_index_to_receipts.sql diff --git a/db/migrations/20180110203941_add_fields_to_node.sql b/db/migrations/00029_add_fields_to_node.sql similarity index 100% rename from db/migrations/20180110203941_add_fields_to_node.sql rename to db/migrations/00029_add_fields_to_node.sql diff --git a/db/migrations/20180110204835_update_node_index.sql b/db/migrations/00030_update_node_index.sql similarity index 100% rename from db/migrations/20180110204835_update_node_index.sql rename to db/migrations/00030_update_node_index.sql diff --git a/db/migrations/20180115220111_add_log_fk_constraint.sql b/db/migrations/00031_add_log_fk_constraint.sql similarity index 100% rename from db/migrations/20180115220111_add_log_fk_constraint.sql rename to db/migrations/00031_add_log_fk_constraint.sql diff --git a/db/migrations/20180122201903_add_log_filters.sql b/db/migrations/00032_add_log_filters.sql similarity index 100% rename from db/migrations/20180122201903_add_log_filters.sql rename to db/migrations/00032_add_log_filters.sql diff --git a/db/migrations/20180122213613_add_watched_event_logs.sql b/db/migrations/00033_add_watched_event_logs.sql similarity index 100% rename from db/migrations/20180122213613_add_watched_event_logs.sql rename to db/migrations/00033_add_watched_event_logs.sql diff --git a/db/migrations/20180202032433_update_gas_limit_gas_used.sql b/db/migrations/00034_update_gas_limit_gas_used.sql similarity index 100% rename from db/migrations/20180202032433_update_gas_limit_gas_used.sql rename to db/migrations/00034_update_gas_limit_gas_used.sql diff --git a/db/migrations/20180202213423_rename_block_columns.sql b/db/migrations/00035_rename_block_columns.sql similarity index 100% rename from db/migrations/20180202213423_rename_block_columns.sql rename to db/migrations/00035_rename_block_columns.sql diff --git a/db/migrations/20180202220756_update_tx_table_names.sql b/db/migrations/00036_update_tx_table_names.sql similarity index 100% rename from db/migrations/20180202220756_update_tx_table_names.sql rename to db/migrations/00036_update_tx_table_names.sql diff --git a/db/migrations/20180205191315_update_log_filters_to_block_constraint.sql b/db/migrations/00037_update_log_filters_to_block_constraint.sql similarity index 100% rename from db/migrations/20180205191315_update_log_filters_to_block_constraint.sql rename to db/migrations/00037_update_log_filters_to_block_constraint.sql diff --git a/db/migrations/20180305233813_update_eth18_types.sql b/db/migrations/00038_update_eth18_types.sql similarity index 100% rename from db/migrations/20180305233813_update_eth18_types.sql rename to db/migrations/00038_update_eth18_types.sql diff --git a/db/migrations/20180321150314_rename_node_table.sql b/db/migrations/00039_rename_node_table.sql similarity index 100% rename from db/migrations/20180321150314_rename_node_table.sql rename to db/migrations/00039_rename_node_table.sql diff --git a/db/migrations/20180430230941_associate_receipts_with_blocks.sql b/db/migrations/00040_associate_receipts_with_blocks.sql similarity index 100% rename from db/migrations/20180430230941_associate_receipts_with_blocks.sql rename to db/migrations/00040_associate_receipts_with_blocks.sql diff --git a/db/migrations/20180504220928_add_eth_node_fingerprint_to_blocks.sql b/db/migrations/00041_add_eth_node_fingerprint_to_blocks.sql similarity index 100% rename from db/migrations/20180504220928_add_eth_node_fingerprint_to_blocks.sql rename to db/migrations/00041_add_eth_node_fingerprint_to_blocks.sql diff --git a/db/migrations/20180606224502_create_token_supply_table.sql b/db/migrations/00042_create_token_supply_table.sql similarity index 100% rename from db/migrations/20180606224502_create_token_supply_table.sql rename to db/migrations/00042_create_token_supply_table.sql diff --git a/db/migrations/20180716182130_create_headers_table.sql b/db/migrations/00043_create_headers_table.sql similarity index 100% rename from db/migrations/20180716182130_create_headers_table.sql rename to db/migrations/00043_create_headers_table.sql diff --git a/db/migrations/20180724233837_create_checked_headers_table.sql b/db/migrations/00044_create_checked_headers_table.sql similarity index 100% rename from db/migrations/20180724233837_create_checked_headers_table.sql rename to db/migrations/00044_create_checked_headers_table.sql diff --git a/db/migrations/20190219134901_create_queued_storage.sql b/db/migrations/00045_create_queued_storage.sql similarity index 100% rename from db/migrations/20190219134901_create_queued_storage.sql rename to db/migrations/00045_create_queued_storage.sql