Skip to content

Return DBActions from Complete #902

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 24, 2025
Merged

Conversation

kvch
Copy link
Contributor

@kvch kvch commented Jun 13, 2025

This PR changes the signature of Complete. From now on, it returns a list of DBActions.

I am transforming Rollback and Start calls in upcoming PRs. Once all the migration phases are refactored, I am adding coordination between the operations to eliminate unnecessary steps and invalid actions sequences (like trying to rename a duplicated column multiple times).

@github-actions github-actions bot temporarily deployed to Docs Preview June 13, 2025 13:47 Inactive
@github-actions github-actions bot temporarily deployed to Docs Preview June 13, 2025 13:51 Inactive
@kvch kvch force-pushed the refactoring-return-actions-from-complete branch from 119909f to ff73bec Compare June 13, 2025 14:20
@github-actions github-actions bot temporarily deployed to Docs Preview June 13, 2025 14:20 Inactive
@kvch kvch force-pushed the refactoring-return-actions-from-complete branch from ff73bec to 7e2618d Compare June 13, 2025 14:46
@github-actions github-actions bot temporarily deployed to Docs Preview June 13, 2025 14:47 Inactive
@kvch kvch requested a review from andrew-farries June 13, 2025 14:58
@kvch kvch marked this pull request as ready for review June 13, 2025 14:59
@kvch kvch removed the request for review from andrew-farries June 15, 2025 08:41
@kvch kvch marked this pull request as draft June 16, 2025 08:03
@kvch kvch force-pushed the refactoring-return-actions-from-complete branch from 7e2618d to 09f3fca Compare June 23, 2025 10:57
@github-actions github-actions bot temporarily deployed to Docs Preview June 23, 2025 10:57 Inactive
@kvch kvch marked this pull request as ready for review June 23, 2025 11:23
@kvch kvch requested a review from andrew-farries June 23, 2025 11:23
@kvch kvch force-pushed the refactoring-return-actions-from-complete branch from 09f3fca to acc59fc Compare June 24, 2025 08:39
@kvch kvch enabled auto-merge (squash) June 24, 2025 08:39
@github-actions github-actions bot temporarily deployed to Docs Preview June 24, 2025 08:39 Inactive
@kvch kvch merged commit d7f2f61 into main Jun 24, 2025
29 checks passed
@kvch kvch deleted the refactoring-return-actions-from-complete branch June 24, 2025 08:41
Copy link

Merging this branch changes the coverage (1 decrease, 1 increase)

Impacted Packages Coverage Δ 🤖
github.com/xataio/pgroll/pkg/migrations 75.29% (+0.68%) 👍
github.com/xataio/pgroll/pkg/roll 79.64% (-0.43%) 👎

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/xataio/pgroll/pkg/migrations/migrations.go 94.12% (ø) 17 16 1
github.com/xataio/pgroll/pkg/migrations/op_add_column.go 85.34% (+4.36%) 116 (-26) 99 (-16) 17 (-10) 👍
github.com/xataio/pgroll/pkg/migrations/op_alter_column.go 86.49% (+2.75%) 111 (-12) 96 (-7) 15 (-5) 👍
github.com/xataio/pgroll/pkg/migrations/op_change_type.go 92.86% (ø) 14 13 1
github.com/xataio/pgroll/pkg/migrations/op_create_constraint.go 81.42% (+3.26%) 113 (-6) 92 (-1) 21 (-5) 👍
github.com/xataio/pgroll/pkg/migrations/op_create_index.go 69.35% (ø) 62 43 19
github.com/xataio/pgroll/pkg/migrations/op_create_table.go 83.97% (ø) 131 110 21
github.com/xataio/pgroll/pkg/migrations/op_drop_column.go 78.12% (+1.38%) 32 (-11) 25 (-8) 7 (-3) 👍
github.com/xataio/pgroll/pkg/migrations/op_drop_constraint.go 84.00% (+4.00%) 50 (-15) 42 (-10) 8 (-5) 👍
github.com/xataio/pgroll/pkg/migrations/op_drop_index.go 90.91% (ø) 11 10 1
github.com/xataio/pgroll/pkg/migrations/op_drop_multicolumn_constraint.go 86.57% (+4.07%) 67 (-13) 58 (-8) 9 (-5) 👍
github.com/xataio/pgroll/pkg/migrations/op_drop_not_null.go 93.33% (ø) 15 14 1
github.com/xataio/pgroll/pkg/migrations/op_drop_table.go 86.96% (-0.54%) 23 (-1) 20 (-1) 3 👎
github.com/xataio/pgroll/pkg/migrations/op_raw_sql.go 88.89% (ø) 18 16 2
github.com/xataio/pgroll/pkg/migrations/op_rename_column.go 93.33% (ø) 30 28 2
github.com/xataio/pgroll/pkg/migrations/op_rename_constraint.go 100.00% (ø) 16 16 0
github.com/xataio/pgroll/pkg/migrations/op_rename_table.go 100.00% (ø) 15 15 0
github.com/xataio/pgroll/pkg/migrations/op_set_check.go 86.96% (+2.34%) 23 (-3) 20 (-2) 3 (-1) 👍
github.com/xataio/pgroll/pkg/migrations/op_set_comment.go 90.00% (ø) 10 9 1
github.com/xataio/pgroll/pkg/migrations/op_set_default.go 85.71% (ø) 21 18 3
github.com/xataio/pgroll/pkg/migrations/op_set_fk.go 75.00% (+0.71%) 32 (-3) 24 (-2) 8 (-1) 👍
github.com/xataio/pgroll/pkg/migrations/op_set_notnull.go 86.36% (+5.72%) 22 (-9) 19 (-6) 3 (-3) 👍
github.com/xataio/pgroll/pkg/migrations/op_set_replica_identity.go 100.00% (ø) 21 21 0
github.com/xataio/pgroll/pkg/migrations/op_set_unique.go 77.27% (ø) 22 17 5
github.com/xataio/pgroll/pkg/roll/execute.go 78.57% (-0.82%) 168 (+3) 132 (+1) 36 (+2) 👎

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.

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