go-gorm / postgres

GORM PostgreSQL driver
MIT License
228 stars 120 forks source link

fix text default value produces "'::text'" as value #210

Closed artlo closed 11 months ago

artlo commented 1 year ago

What did this pull request do?

Fixing incorrect default value in auto generated models.

User Case Description

If DB column definition has column name text default value '' then the generated model will have the Go tag: default:"''::text" and value ''::text will be written to DB column as default value.