Skip to content

Use existing dbactions in op_alter_column #879

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
Jun 11, 2025

Conversation

kvch
Copy link
Contributor

@kvch kvch commented Jun 10, 2025

Related #742

@github-actions github-actions bot temporarily deployed to Docs Preview June 10, 2025 16:47 Inactive
@kvch kvch force-pushed the refactoring-use-actions-in-alter-column branch from 44b15a5 to ab6d1d0 Compare June 10, 2025 17:03
@github-actions github-actions bot temporarily deployed to Docs Preview June 10, 2025 17:03 Inactive
@kvch kvch marked this pull request as draft June 10, 2025 17:06
@kvch kvch force-pushed the refactoring-use-actions-in-alter-column branch from ab6d1d0 to 12a92f1 Compare June 11, 2025 13:30
@github-actions github-actions bot temporarily deployed to Docs Preview June 11, 2025 13:30 Inactive
@kvch kvch force-pushed the refactoring-use-actions-in-alter-column branch from 12a92f1 to c659fd5 Compare June 11, 2025 13:47
@github-actions github-actions bot temporarily deployed to Docs Preview June 11, 2025 13:47 Inactive
Copy link

Merging this branch will not change overall coverage

Impacted Packages Coverage Δ 🤖
github.com/xataio/pgroll/pkg/migrations 74.02% (ø)

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/xataio/pgroll/pkg/migrations/op_add_column.go 79.29% (-0.24%) 169 (-2) 134 (-2) 35 👎
github.com/xataio/pgroll/pkg/migrations/op_set_notnull.go 80.65% (+1.33%) 31 (+2) 25 (+2) 6 👍

Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code.

conn,
table.Name,
NotNullConstraintName(o.Column.Name),
fmt.Sprintf("%s IS NOT NULL", o.Column.Name),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am not passing TemporaryName(o.Column.Name) because the action takes care of rewriting the check expression.

conn,
table.Name,
o.Column.Check.Name,
o.Column.Check.Constraint,
Copy link
Contributor Author

@kvch kvch Jun 11, 2025

Choose a reason for hiding this comment

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

I am not rewriting the expression here because the action takes care of it.

conn,
table.Name,
NotNullConstraintName(o.Column),
fmt.Sprintf("%s IS NOT NULL", o.Column),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am not rewriting the expression here because the action takes care of it.

@kvch kvch marked this pull request as ready for review June 11, 2025 13:52
@kvch kvch requested a review from andrew-farries June 11, 2025 13:52
@kvch kvch merged commit fcda88a into main Jun 11, 2025
30 checks passed
@kvch kvch deleted the refactoring-use-actions-in-alter-column branch June 11, 2025 15:43
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