Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR migrates Loco.rs from SeaORM 1.x to SeaORM 2.0, including all necessary code updates and dependency changes to support the new version.
Changes
1. Dependency Updates
sea-ormfrom1.1.0to2.0.0-rc.19sea-orm-migrationfrom1.0.0to2.0.0-rc.19sea-queryto use a custom git repository during migration2. Query DSL Module Refactor
IntoConditionimplementation forConditionBuilderFrom<ConditionBuilder> for ConditionimplementationConditionBuilderto beClonebuild()method to returnConditiondirectly3. Database Schema Migration
query_one_rawinstead ofquery_oneunimplemented!()fallbacks4. Database Operations
query_onewithquery_one_rawacross the codebaseexecutecalls toexecute_rawfor schema operations5. Iden Trait Implementation
Idenimplementation for theLocoenum to match SeaORM 2.0 API changesunquotedmethod signature to return&strinstead of writing to a formatter6. Middleware Updates
TimeoutLayer::with_status_codeStatusCode::from_u16for status code creation7. Template Updates
Cargo.tomlfiles to use SeaORM 2.0Breaking Changes Addressed
SeaORM 2.0 API Changes:
query_one()→query_one_raw()execute()→execute_raw()(for schema operations)Iden::unquoted()signature changeIntoConditiontrait in favor ofFromtraitCondition Building:
Database Operations:
Testing
Notes
sea-querypatch is used to address immediate compatibility issuesNext Steps
sea-querypatch once upstream issues are resolvedThis migration ensures Loco.rs remains compatible with the latest SeaORM version while maintaining all existing functionality.