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

skipIf throw Exception on following Migrations #1384

Open
Aluok opened this issue Dec 14, 2023 · 1 comment
Open

skipIf throw Exception on following Migrations #1384

Aluok opened this issue Dec 14, 2023 · 1 comment

Comments

@Aluok
Copy link

Aluok commented Dec 14, 2023

Bug Report

Q A
BC Break no
Version 3.7.2

Summary

Firstly, thank you for your hard work.
Then, we want to use the skipIf method to manage feature flags while keeping the process automated.
As per the doc, we expect it to skip the migration, and continue with the following afterwards.

Current behavior

The skipIf does skip the current migration without problems if it is the last one. If the migration using it is followed by a migration which is not skipped, the following error occurs :
Transaction commit failed because the transaction has been marked for rollback only.

How to reproduce

A quick project can be setup with Symfony as

composer create-project symfony/skeleton:"5.4.*" .
composer require orm
composer require doctrine/migrations

Then create 3 migrations, use $this->skipIf(true) in the middle one, and run all migrations

Expected behavior

the command should terminate, and the list should show that the first and last were executed, but not the middle one.

@DominicDetta
Copy link

I found out the same problem. I don't understand why the migration is marked as rollback since it does not have to be performed

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

No branches or pull requests

2 participants