Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Run queries within queryRunner transaction sequentially (twentyhq#5668)
Within a queryRunner transaction, it is important that migrations are run subsequently and not concurrently: otherwise if an error is thrown by one of the query, it will abort the transaction; any subsequent query running on the same queryRunner will cause the error _current transaction is aborted, commands ignored until end of transaction block_. Using an async function in a map as below does not guarantee that each query terminates before iterating over the next one, which can be an issue as described above, and which seems to cause [this sentry](https://twenty-v7.sentry.io/issues/5258406553/?environment=prod&project=4507072499810304&query=is%3Aunresolved+issue.priority%3A%5Bhigh%2C+medium%5D&referrer=issue-stream&statsPeriod=7d&stream_index=4).
- Loading branch information