Skip to content

Cot-cli small refactor#224

Merged
seqre merged 1 commit intomasterfrom
cli-qol-fixes
Mar 4, 2025
Merged

Cot-cli small refactor#224
seqre merged 1 commit intomasterfrom
cli-qol-fixes

Conversation

@seqre
Copy link
Member

@seqre seqre commented Mar 3, 2025

No description provided.

@seqre seqre requested a review from m4tx March 3, 2025 23:20
@seqre seqre self-assigned this Mar 3, 2025
@seqre seqre marked this pull request as ready for review March 3, 2025 23:30
@seqre seqre marked this pull request as draft March 4, 2025 00:04
@codecov
Copy link

codecov bot commented Mar 4, 2025

Codecov Report

Attention: Patch coverage is 69.03766% with 74 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
cot-cli/src/migration_generator.rs 69.03% 65 Missing and 9 partials ⚠️
Flag Coverage Δ
rust 78.66% <69.03%> (+0.05%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
cot-cli/src/migration_generator.rs 81.76% <69.03%> (+0.46%) ⬆️

@seqre seqre marked this pull request as ready for review March 4, 2025 09:59
This is pointless by itself now, but it will be needed in future changes.

refactor: split generating and writing migrations

refactor: minor fixes

refactor: extract operations to separate struct

fix: make tests pass

chore: use better method names

chore: use new names in tests

test: add few

chore: add GH sponsors to FUNDING.yml (#222)

(cherry picked from commit 098fc5a)

fix: include APP_NAME in model (#228)

(cherry picked from commit ffc8870)

feat: support "Remove Model" in Automatic Migration Generator (#221)

* Add support for removing models in automatic migration generator

Implement the ability to detect when a model has been removed from the
codebase and generate appropriate migration operations.
This includes:
- Add RemoveModel variant to OperationInner enum in migrations.rs
- Create RemoveModelBuilder for constructing remove operations
- Implement make_remove_model_operation in migration_generator.rs
- Update relevant utility functions to handle the new operation type
- Add tests for the new functionality
Fixes #207

* Update cot-cli/src/migration_generator.rs

---------

Co-authored-by: Marek Grzelak <marek.grzelak@praetorian.com>
@seqre seqre enabled auto-merge (squash) March 4, 2025 14:52
@seqre seqre merged commit 942105d into master Mar 4, 2025
27 checks passed
@seqre seqre deleted the cli-qol-fixes branch March 4, 2025 15:00
@cotbot cotbot bot mentioned this pull request Mar 4, 2025
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