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

sql/postgres: apply generate columns for new columns #721

Merged
merged 1 commit into from
Apr 18, 2022
Merged

Conversation

a8m
Copy link
Member

@a8m a8m commented Apr 18, 2022

No description provided.

@@ -171,7 +171,15 @@ func (d *diff) typeChanged(from, to *schema.Column) (bool, error) {
case *schema.BinaryType, *schema.BoolType, *schema.DecimalType, *schema.FloatType,
*schema.IntegerType, *schema.JSONType, *schema.SpatialType, *schema.StringType,
*schema.TimeType, *BitType, *NetworkType, *UserDefinedType:
changed = mustFormat(toT) != mustFormat(fromT)
t1, err1 := FormatType(toT)
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do you need err1 & err2? can't you use just err?

Copy link
Member Author

Choose a reason for hiding this comment

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

I can. I wrote it differently and then changed it.

Will fix, thanks

Copy link
Contributor

@zeevmoney zeevmoney left a comment

Choose a reason for hiding this comment

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

lgtm, see comment.

@a8m a8m force-pushed the pg/creategenexpr branch from 3c799e1 to f28f82a Compare April 18, 2022 17:12
@a8m a8m merged commit b83b848 into master Apr 18, 2022
@a8m a8m deleted the pg/creategenexpr branch April 18, 2022 17:22
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.

3 participants