We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'm using gorm.io/gen to generate models from schema. Driver update from v1.5.3 to v1.5.4 changed the way default value for jsonb is generated.
// v1.5.3 type MyModel struct { Data datatypes.JSON `gorm:"column:data;type:jsonb;default:'{}'" json:"data"` } // v1.5.4 type MyModel struct { Data datatypes.JSON `gorm:"column:data;type:jsonb;default:{}" json:"data"` }
(datatypes.JSON is my customization with DataTypeMap)
Now when running AutoMigrate I get the following error:
AutoMigrate
Error migrating the database: ERROR: syntax error at or near "{" (SQLSTATE 42601)
The text was updated successfully, but these errors were encountered:
jinzhu
No branches or pull requests
Description
I'm using gorm.io/gen to generate models from schema. Driver update from v1.5.3 to v1.5.4 changed the way default value for jsonb is generated.
(datatypes.JSON is my customization with DataTypeMap)
Now when running
AutoMigrate
I get the following error:The text was updated successfully, but these errors were encountered: