Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change TRUNCATE to DELETE FROM in postgres database
This actually isn't a problem for postgres but is a problem for cockroach. Internally cockroach drops the table when running a truncate which causes the insert to fail inside of this transaction. I added repro steps to mattes/migrate#320 which this PR should close. Closes: mattes/migrate#320 Signed-off-by: Elliott Davis <[email protected]>
- Loading branch information
1e148b9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fixed an issue I was experiencing with CockroachDB. However this project is now deprecated. https://github.com/golang-migrate/migrate is now the official project.