go-gorm / postgres

GORM PostgreSQL driver
MIT License
234 stars 123 forks source link

fix: default value with typecast and tests #211

Closed MrChaos1993 closed 1 year ago

MrChaos1993 commented 1 year ago

What did this pull request do?

Fixing incorrect default value in auto generated models.

User Case Description

The current version(master) ignore default value if it contains type cast.

also will fix following PR: https://github.com/go-gorm/postgres/pull/210 https://github.com/go-gorm/postgres/pull/201

related issues: https://github.com/go-gorm/gorm/issues/6543

related PR: https://github.com/go-gorm/postgres/pull/143

jinzhu commented 1 year ago

Sorry for the confliction due to merge PR #210, can you fix them, thank you.