Skip to content

Conversation

@Dosenpfand
Copy link
Contributor

@Dosenpfand Dosenpfand commented Apr 28, 2025

Does your PR solve an issue?

fixes #3841

Is this a breaking change?

Yes, it modifies the public trait Migrate.

@Dosenpfand Dosenpfand force-pushed the migrations-skip branch 3 times, most recently from b06c41e to 511b44b Compare April 28, 2025 12:20
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.

Sorry for the delay in review. I'm happy to land this change as it's an oft-requested feature, but it needs rebasing and there's a couple design nits. Depending on when you get to this, there may not be time to land it in 0.9.0.

However, if we modify it to not be a breaking change (which is quite easy), then this can land in any future release.

)
.await?
}
MigrateCommand::Skip {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'd like to put this under an override subcommand. That way, it's clear that what you're doing is potentially dangerous, and we can add other useful commands there as well (such as forgetting already-run migrations or updating their hashes).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I adapted it, hope I understood you correctly.

fn apply<'e: 'm, 'm>(
&'e mut self,
migration: &'m Migration,
skip: bool,
Copy link
Collaborator

@abonander abonander Sep 12, 2025

Choose a reason for hiding this comment

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

Instead of modifying the signature of this method, which is a breaking change, we can add a new method with a provided body that returns Err(MigrateError::SkipNotSupported) by default.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@Dosenpfand Dosenpfand force-pushed the migrations-skip branch 2 times, most recently from f135644 to c92227b Compare January 22, 2026 14:30
@Dosenpfand
Copy link
Contributor Author

Sorry for the delay also from my side and thank you for the feedback! I tried to address your findings.

@Dosenpfand Dosenpfand force-pushed the migrations-skip branch 3 times, most recently from 387c35f to 0ffb6a9 Compare January 23, 2026 06:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Skipping/Faking Migrations

2 participants