Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
db: Filter out all generated foreign key constraints
While testing it was found that if all foreign key constraints were removed from the generated schema migrations, total chain sync time on mainnet dropped from 6 days to a little over 3 days. These constraints do very little to improve data integrity of the data in the database because they are already checked in Haskell land. They can therefore be dropped. The Haskell land code will however need to be modified/updated to work around the lack of these constraints. For example removing these foreign key constraints means that `OnDeleteCascade` will no longer work and will therefore have to be done manually. This is a small price to pay for the sync speed improvements.
- Loading branch information