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
part fails because transactions are used. When this code is invoked, the table is created successfully but insert fails and we get the state where we have empty goose_db_version table since transaction does not rollback table creation. Later, following migrations fail with error:
2024/09/09 13:01:19 database migration failed: no next version found
Would it be possible to run createVersionTable function without transaction for MySQL dialect? This solution would work and fix our problem. I could implement this but need some guidance and ideas how I could code it up.
The text was updated successfully, but these errors were encountered:
JuozasVainauskas
changed the title
Migrations table creation and insert fails on MySQL with gh-ost DDL strategy
Migrations table creation and insert fails on MySQL during transaction
Sep 9, 2024
I'll need to investigate this a bit further, but I'm quite surprised as we test goose against a number of databases and afaik many users use MySQL or MariaDB already.
MySQL does not support transactions on
CREATE
operation:goose/migrate.go
Lines 249 to 263 in 1984573
goose_db_version
table since transaction does not rollback table creation. Later, following migrations fail with error:Would it be possible to run
createVersionTable
function without transaction forMySQL
dialect? This solution would work and fix our problem. I could implement this but need some guidance and ideas how I could code it up.The text was updated successfully, but these errors were encountered: