Skip to content
New issue

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

Gentool generates invalid tags on Postgres SERIAL PRIMARY KEY column #1128

Open
rabarar opened this issue Apr 11, 2024 · 0 comments
Open

Gentool generates invalid tags on Postgres SERIAL PRIMARY KEY column #1128

rabarar opened this issue Apr 11, 2024 · 0 comments

Comments

@rabarar
Copy link

rabarar commented Apr 11, 2024

GORM Playground Link

generated code from gentool utility

AppID is defined as a Serial primary key in the database…

// App mapped from table
type App struct {
AppID int32 gorm:"column:AppID;type:integer;primaryKey;default:nextval('"Apps_AppID_seq"" json:"AppID"
Port int32 gorm:"column:Port;type:integer" json:"Port"
AppName string gorm:"column:AppName;type:character varying(255);not null" json:"AppName"
Description string gorm:"column:Description;type:text" json:"Description"
}

go-gorm/playground#1

Description

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant