When I was running the run_all_migrations.sh against production it was hanging for a long time.
This is because of this LOC which creates an expensive index:
https://github.com/regen-network/indexer/blob/main/sql/V1__init.sql#L38
This SQL line could be adjusted to be idempotent using an if not exists syntax.
Additionally, this task should check that there are no other expensive non-idempotent operations in the SQL files.
We should also a note about this into the sql/README.md i.e. "please only make use of idempotent operations"
When I was running the
run_all_migrations.sh
against production it was hanging for a long time. This is because of this LOC which creates an expensive index: https://github.com/regen-network/indexer/blob/main/sql/V1__init.sql#L38 This SQL line could be adjusted to be idempotent using an if not exists syntax. Additionally, this task should check that there are no other expensive non-idempotent operations in the SQL files. We should also a note about this into thesql/README.md
i.e. "please only make use of idempotent operations"