woodpecker-ci / woodpecker

Woodpecker is a simple, yet powerful CI/CD engine with great extensibility.
https://woodpecker-ci.org
Apache License 2.0
4.3k stars 371 forks source link

Inline model types for migrations #4293

Closed 6543 closed 1 week ago

6543 commented 2 weeks ago

to not have side effects on migration if refactoring is done, all type definitions should be declared within the migration.

this is already done but in-lining even isolates the types between migrations itself.

and as shown by the refactor the where already missuses sometimes, this fixes this.

codecov[bot] commented 2 weeks ago

Codecov Report

Attention: Patch coverage is 94.00749% with 16 lines in your changes missing coverage. Please review.

Project coverage is 27.06%. Comparing base (066926f) to head (6f4d3f4). Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...re/datastore/migration/000_legacy_to_xormigrate.go 0.00% 5 Missing :warning:
server/store/datastore/migration/001_add_org_id.go 88.23% 0 Missing and 2 partials :warning:
...re/migration/004_remove_secrets_plugin_only_col.go 88.88% 0 Missing and 1 partial :warning:
...ation/005_convert_to_new_pipeline_errors_format.go 94.11% 0 Missing and 1 partial :warning:
...datastore/migration/007_clean_registry_pipeline.go 93.33% 0 Missing and 1 partial :warning:
...re/datastore/migration/008_set_default_forge_id.go 50.00% 0 Missing and 1 partial :warning:
...re/datastore/migration/009_unify_columns_tables.go 99.41% 0 Missing and 1 partial :warning:
...e/datastore/migration/012_rename_start_end_time.go 87.50% 0 Missing and 1 partial :warning:
...er/store/datastore/migration/015_add_org_agents.go 87.50% 0 Missing and 1 partial :warning:
...astore/migration/016_add_custom_labels_to_agent.go 83.33% 0 Missing and 1 partial :warning:
... and 1 more
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #4293 +/- ## ========================================== + Coverage 26.53% 27.06% +0.53% ========================================== Files 379 379 Lines 27555 27753 +198 ========================================== + Hits 7311 7512 +201 + Misses 19575 19572 -3 Partials 669 669 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

woodpecker-bot commented 1 week ago

Tearing down https://woodpecker-ci-woodpecker-pr-4293.surge.sh