Closed manstis closed 1 year ago
If you want to explain where the problem is likely to be I am happy to try a fix.
gorm\schema\field.go#ParseField
has AutoIncrement
set to false
for XXXserial
fields.
IDK if that is wrong; but I suspect since it is in the core gorm
(and not a driver) that behaviour is correct.
gorm\migrator\migrator.go#MigrateColumn
is where gorm
sees the column as changed and tries to alter it.
Closing due to age.
GORM Playground Link
https://github.com/go-gorm/playground/pull/571/
Description
If you repeat the migration of a table with a column of type
XXXserial
the migration attempts to update the column and fails.You'll need to start Postgres
docker-compose up
GORM_DIALECT=postgres
is set