Skip to content

Automatically infer migration type#2664

Merged
abonander merged 1 commit into
transact-rs:mainfrom
vmax:feature/automatically-infer-migration-type
Aug 1, 2023
Merged

Automatically infer migration type#2664
abonander merged 1 commit into
transact-rs:mainfrom
vmax:feature/automatically-infer-migration-type

Conversation

@vmax
Copy link
Copy Markdown
Contributor

@vmax vmax commented Jul 28, 2023

Since sqlx requires all migrations to be of the same type (simple or reversible), it makes sense to automatically set the type of newly generated migration to be the same as the last one if it exists.

Copy link
Copy Markdown
Collaborator

@abonander abonander left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The merge conflict made me notice this actually included a breaking change which needs to be reverted or it cannot be merged for the 0.7.x release cycle.

(Also please fix the merge conflict.)

Comment thread sqlx-core/src/migrate/error.rs
@vmax
Copy link
Copy Markdown
Contributor Author

vmax commented Aug 1, 2023

@abonander I rebased it to latest main and marked MigrateError::InvalidMixReversibleAndSimple as deprecated

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