You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After upgrading from v6.2.0 to v6.7.3, the code now fails:
BEGIN
SELECT count(*) FROM "pg_tables" WHERE (schemaname = 'public') AND (tablename = 'gopg_migrations')
SET idle_in_transaction_session_timeout = 0
LOCK TABLE gopg_migrations
SELECT version FROM gopg_migrations ORDER BY id DESC LIMIT 1
COMMIT
panic: pg: transaction has already been committed or rolled back
With the introduction of go modules we needed a newer version of go-pg.
This version introduced some changes in the schema definition as well as in the migration process.
Running the migration inside a global transaction is currently not possible and therefor split into transactions for each migration (go-pg/migrations#74).
With the introduction of go modules we needed a newer version of go-pg.
This version introduced some changes in the schema definition as well as in the migration process.
Running the migration inside a global transaction is currently not possible and therefor split into transactions for each migration (go-pg/migrations#74).
For running all migrations in a global transaction, the README suggests code like the following:
After upgrading from v6.2.0 to v6.7.3, the code now fails:
I don't see nested transactions in the output, but it does look like the code will attempt to create a transaction for each migration: https://github.com/go-pg/migrations/blob/master/collection.go#L454
The text was updated successfully, but these errors were encountered: