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

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 vmax force-pushed the feature/automatically-infer-migration-type branch from 26073be to eb7ee24 Compare August 1, 2023 08:15
@vmax
Copy link
Contributor Author

vmax commented Aug 1, 2023

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

@vmax vmax force-pushed the feature/automatically-infer-migration-type branch from eb7ee24 to 0f026ac Compare August 1, 2023 08:17
@vmax vmax force-pushed the feature/automatically-infer-migration-type branch from 0f026ac to 1b409bd Compare August 1, 2023 08:18
@abonander abonander merged commit d0fbe7f into launchbadge:main Aug 1, 2023
58 checks passed
@vmax vmax deleted the feature/automatically-infer-migration-type branch August 1, 2023 18:22
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.

None yet

2 participants