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

distinguish between schema.Time and tag time #109

Closed
wants to merge 1 commit into from

Conversation

black-06
Copy link
Contributor

  • Do only one thing
  • Non breaking API changes
  • Tested

What did this pull request do?

fix go-gorm/gorm#6033

User Case Description

type Test struct {
    Date time.Time `gorm:"type:date"`
    Time time.Time `gorm:"type:time"`
    DefaultDateTime time.Time
}
CREATE TABLE `tests` (`date` date,`time` time,`default_date_time` datetime)

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.

Not only time, but actually all types have the same problem, can we skip to getSchemaCustomType, if the tag type is specified without specifying precision, size?
If so, we only need to add a field in schema.Field to identify it

go-gorm/sqlserver#86

@black-06
Copy link
Contributor Author

So, we need to create a new tag in gorm and then upgrade dirver's dependence?

@a631807682
Copy link
Member

So, we need to create a new tag in gorm and then upgrade dirver's dependence?

I think so

@black-06
Copy link
Contributor Author

So, we need to create a new tag in gorm and then upgrade dirver's dependence?

I think so

Okay

@black-06 black-06 marked this pull request as draft February 20, 2023 08:16
@black-06 black-06 marked this pull request as ready for review March 14, 2023 02:51
@jinzhu jinzhu closed this May 19, 2023
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.

type标签无法指定time类型?
3 participants