Skip to content

Skipping/Faking Migrations #3841

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

Open
Dosenpfand opened this issue Apr 24, 2025 · 1 comment · May be fixed by #3846
Open

Skipping/Faking Migrations #3841

Dosenpfand opened this issue Apr 24, 2025 · 1 comment · May be fixed by #3846
Labels
enhancement New feature or request

Comments

@Dosenpfand
Copy link

I have found these related issues/pull requests

Relates to #3706

Description

In my use case it would be helpful to be able to skip/fake migrations, i.e. mark migrations as done but not actually execute the SQL statements of the migration.

I have a system with existing migrations and deployments at different versions. I want to port the migrations to sqlx, and would therefore need to fake/skip already applied migrations, using my current migration method.

Prefered solution

I already hacked together a PoC for SQLite (duplicated code, no tests, etc.) in Dosenpfand/sqlx/migrations-skip. If there is interest in this I would be willing to prepare a proper implementation and open a PR.

An ideal solution would allow skipping migrations via sqlx::migrate::Migrator as well as via the cli e.g. sqlx migrate skip [OPTIONS]

Is this a breaking change? Why or why not?

Not necessarily

@Dosenpfand Dosenpfand added the enhancement New feature or request label Apr 24, 2025
@Dosenpfand Dosenpfand linked a pull request Apr 28, 2025 that will close this issue
@Dosenpfand
Copy link
Author

I had a bit of time so I tried to add this feature and opened #3846 for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant