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

Disable check checksum and missing previous executed migrations #137

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ondrejkrajcik-blogic
Copy link

With this feature you can disable checking of checksum and previous executed migrations in group.

$controller->addGroup('structures', __DIR__ . 'migrations/structures', checkChecksum: false, checkMissingPreviousExecuted: false);

Why:
When I create migration on branch A and run. Then create new branch from master, create next one migration, run migrations I get error because my migration from branch A missing. I need to disable theese checks for development.

The default behavior has been preserved

@hrach
Copy link
Member

hrach commented Apr 19, 2024

The main tool to handle such use case is the database reset. In the dev environment, it should be quite viable.

Please see https://www.youtube.com/watch?v=FOsZFE-SSvM where Honza explains the motivation.

Anyway, I'm letting him decide.

@hrach hrach requested a review from JanTvrdik April 19, 2024 11:44
@JanTvrdik
Copy link
Member

You either need to reset migrations after every branch switch, or use a separate database for each branch.

@ondrejkrajcik-blogic ondrejkrajcik-blogic force-pushed the checksum_and_missing_previous_executed branch 3 times, most recently from bf91999 to eed98c2 Compare April 25, 2024 06:43
@ondrejkrajcik-blogic ondrejkrajcik-blogic force-pushed the checksum_and_missing_previous_executed branch from eed98c2 to 93444e2 Compare April 30, 2024 06:23
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.

3 participants