Skip to content

Fix postgresql default type generation #57

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

Merged
merged 1 commit into from
Nov 7, 2024
Merged

Conversation

ferluci
Copy link
Contributor

@ferluci ferluci commented Nov 7, 2024

Right now generation of default values doesn't work properly with Postgresql dialect.

type Model struct {
	ID        string          `sql:"primary_key"`
	CreatedAt time.Time `sql:"type:TIMESTAMP;default:now()"`
	UpdatedAt time.Time `sql:"type:TIMESTAMP;default:now()"`
}

This mr would fix it.

@sunary sunary merged commit c1bffc9 into sunary:master Nov 7, 2024
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.

2 participants