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

feat: custom type implements autoIncrement #121

Merged
merged 5 commits into from Jul 25, 2022
Merged

Conversation

ruanlang
Copy link
Contributor

@ruanlang ruanlang commented Jul 18, 2022

User Case Description

ID int64 gorm:"column:id;type:bigint;primaryKey;autoIncrement:true" json:"id"
go-gorm/gorm#5505 @jinzhu @a631807682

@ruanlang
Copy link
Contributor Author

@a631807682 help review

Copy link
Member

@a631807682 a631807682 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, because sequence only supports these types.
https://www.postgresql.org/docs/current/sql-createsequence.html

@jimmyduang
Copy link
Contributor

@jinzhu boss,please merge

@jinzhu
Copy link
Member

jinzhu commented Jul 25, 2022

Hi @ruanlang

Can you change it like the mysql one?

Thank you.

@ruanlang
Copy link
Contributor Author

@jinzhu please review

postgres.go Outdated Show resolved Hide resolved
@jinzhu jinzhu merged commit dedd1d2 into go-gorm:master Jul 25, 2022
@jimmyduang
Copy link
Contributor

@jinzhu boss,please release this pr,thx

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

Successfully merging this pull request may close these issues.

None yet

4 participants