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
Starting with gorm 1.25.6 I can't automatically migrate tables with uniqueIndex constraint. Here's a very simple example with just one model and one field with the constraint. I removed DROP TABLE commands, so the database keeps the data between the test runs.
Now if you run the test the first time - it passes, if you run it again - you get the error:
Failed to auto migrate, but got error Error 1091 (42000): Can't DROP 'uni_entities_name'; check that column/key exists
This is tested with 1.25.9 and fails there. Works fine in 1.25.5, started failing in 1.25.6.
Tested with MySQL and fails there. Seems working OK with sqlite3 though...
The text was updated successfully, but these errors were encountered:
My bad. After checking the CI logs from the pull request it looks like it works just fine on your side. I tested it further and it seems like upgrading gorm mysql driver 1.5.2->1.5.6 did the job.
GORM Playground Link
go-gorm/playground#717
Description
Starting with gorm 1.25.6 I can't automatically migrate tables with
uniqueIndex
constraint. Here's a very simple example with just one model and one field with the constraint. I removedDROP TABLE
commands, so the database keeps the data between the test runs.Now if you run the test the first time - it passes, if you run it again - you get the error:
This is tested with 1.25.9 and fails there. Works fine in 1.25.5, started failing in 1.25.6.
Tested with MySQL and fails there. Seems working OK with sqlite3 though...
The text was updated successfully, but these errors were encountered: