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

Automatically infer migration type #2664

Merged
merged 1 commit into from
Aug 1, 2023
Merged

Automatically infer migration type #2664

merged 1 commit into from
Aug 1, 2023

Conversation

vmax
Copy link
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
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.)

sqlx-core/src/migrate/error.rs Show resolved Hide resolved
@vmax
Copy link
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