gen
gen copied to clipboard
Incompatible comment format
gen produce field comment as below:
Field1 *string `gorm:"column:field1;type:varchar(10)" json:"field1"` // this is field1 desc
but gorm migration has different definition as below:
Field1 *string `gorm:"column:field1;type:varchar(10);comment:this is field1 desc" json:"field1"`
Looking forward to see the solution. Thanks.
it is as expected.we do not have plan to change it.
but how can I use this for migration?
We do not recommend using generated structures to migrate, it may lead to info miss(index or else) and incompatible between different types of database, You can use DDL to create tables
#784