gorm icon indicating copy to clipboard operation
gorm copied to clipboard

Generated column should not be altered during automigration

Open khalilsarwari opened this issue 1 year ago • 0 comments

GORM Playground Link

https://github.com/go-gorm/playground/pull/496

Description

Once a generated column is created in postgres, it cannot be altered so it should be skipped during automigration.

This is also discussed here

Currently the automigrator tries to alter the column, resulting in an error like:

migrator.go:291 ERROR: syntax error at or near "GENERATED" (SQLSTATE 42601)

khalilsarwari avatar Jul 21 '22 20:07 khalilsarwari