Skip to content

Use DropFunctionAction in remaning operations #880

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
Merged

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:59 Inactive
@kvch kvch requested a review from andrew-farries June 11, 2025 08:35
Copy link
Collaborator

@andrew-farries andrew-farries left a comment

Choose a reason for hiding this comment

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

Not sure about this one.

@@ -41,6 +41,11 @@ type createTriggerAction struct {
cfg triggerConfig
}

type dropTriggerAction struct {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Shouldn't this and the related code go with the other actions in dbactions.go?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Also, this appears to duplicate the existing DropFunctionAction

}
}

func (a *dropTriggerAction) Execute(ctx context.Context) error {
Copy link
Collaborator

Choose a reason for hiding this comment

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

The action is called dropTriggerAction but actually drops a function.

@kvch
Copy link
Contributor Author

kvch commented Jun 11, 2025

Ha, nice catch. I was looking for this action, but could not find it in dbactions.go and did not understand why there are a few instances of this call that are not refactored yet. I am rewriting the PR to use the exsting action.

@kvch kvch force-pushed the refactoring-drop-trigger branch from b9c3713 to f871c45 Compare June 11, 2025 13:38
@github-actions github-actions bot temporarily deployed to Docs Preview June 11, 2025 13:38 Inactive
@kvch kvch changed the title New DBAction: DropFunctionAction Use DropFunctionAction in remaning operations Jun 11, 2025
Copy link

Merging this branch will decrease overall coverage

Impacted Packages Coverage Δ 🤖
github.com/xataio/pgroll/pkg/migrations 74.01% (-0.00%) 👎

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.53% (ø) 171 136 35
github.com/xataio/pgroll/pkg/migrations/op_alter_column.go 83.74% (+0.28%) 123 (-4) 103 (-3) 20 (-1) 👍
github.com/xataio/pgroll/pkg/migrations/op_drop_constraint.go 80.00% (+0.29%) 65 (-4) 52 (-3) 13 (-1) 👍

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.

@kvch kvch requested a review from andrew-farries June 11, 2025 13:41
@kvch kvch merged commit 9535bc2 into main Jun 11, 2025
30 checks passed
@kvch kvch deleted the refactoring-drop-trigger branch June 11, 2025 13:49
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