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

migration x was previously applied but has been modified skip #3794

Open
jonatansalemes opened this issue Mar 18, 2025 · 0 comments
Open

migration x was previously applied but has been modified skip #3794

jonatansalemes opened this issue Mar 18, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@jonatansalemes
Copy link

I have found these related issues/pull requests

i have no found related issues

Description

I have some use cases which i have applied some migrations in production db, after some linters were introduced I cant go further since I added a new line at the end of the previous file to be compliance with new linter.

Can we improve migrate run command to accept like --no-checksum and just logging as warn that file was skipped but modified and continue applying new files ? or new option like migrate --fix-checksum to catch new checksums based on new content and update _sqlx_migrations table

Some(applied_migration) => {
                if migration.checksum != applied_migration.checksum {
                    bail!(MigrateError::VersionMismatch(migration.version));
                }
            }

Prefered solution

creation of new options on slqx migrate run like --no-checksum or --fix-checksum

Is this a breaking change? Why or why not?

no. default options behaviour as the same. use must explicit use new options

@jonatansalemes jonatansalemes added the enhancement New feature or request label Mar 18, 2025
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

No branches or pull requests

1 participant