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

Inline model types for migrations #4293

Merged
merged 7 commits into from
Nov 9, 2024

Conversation

6543
Copy link
Member

@6543 6543 commented Nov 3, 2024

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.

@6543 6543 added server refactor delete or replace old code labels Nov 3, 2024
@anbraten anbraten changed the title Inline model types to make migration more selve contained Inline model types for migrations Nov 4, 2024
Copy link

codecov bot commented Nov 5, 2024

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 ⚠️
server/store/datastore/migration/001_add_org_id.go 88.23% 0 Missing and 2 partials ⚠️
...re/migration/004_remove_secrets_plugin_only_col.go 88.88% 0 Missing and 1 partial ⚠️
...ation/005_convert_to_new_pipeline_errors_format.go 94.11% 0 Missing and 1 partial ⚠️
...datastore/migration/007_clean_registry_pipeline.go 93.33% 0 Missing and 1 partial ⚠️
...re/datastore/migration/008_set_default_forge_id.go 50.00% 0 Missing and 1 partial ⚠️
...re/datastore/migration/009_unify_columns_tables.go 99.41% 0 Missing and 1 partial ⚠️
...e/datastore/migration/012_rename_start_end_time.go 87.50% 0 Missing and 1 partial ⚠️
...er/store/datastore/migration/015_add_org_agents.go 87.50% 0 Missing and 1 partial ⚠️
...astore/migration/016_add_custom_labels_to_agent.go 83.33% 0 Missing and 1 partial ⚠️
... and 1 more
Additional details and impacted files
@@            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              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@6543 6543 requested a review from a team November 5, 2024 13:33
@6543 6543 enabled auto-merge (squash) November 9, 2024 14:56
@6543 6543 merged commit 5139401 into woodpecker-ci:main Nov 9, 2024
7 checks passed
@woodpecker-bot
Copy link
Contributor

@woodpecker-bot woodpecker-bot mentioned this pull request Nov 9, 2024
1 task
@6543 6543 deleted the migrations-inline-types branch November 9, 2024 16:54
@woodpecker-bot woodpecker-bot mentioned this pull request Dec 14, 2024
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor delete or replace old code server
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants