-
-
Notifications
You must be signed in to change notification settings - Fork 215
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
Regression: Migrations table already exists error in 3.4 #585
Comments
Have you seen #584 ? It's not the same issue, but the cause is probably the same. |
Yes, I've seen that, but didn't look like my problem. I'm just guessing here: Maybe it happens because we call the migrate command from another command and this change here sets some sort of listener on an Maybe there lies the culprit? Would nested application calls not be supported this way? $this->logger->notice('Running Doctrine migrations ...');
/** @var MigrateCommand $command */
$command = $this->getApplication()->find('doctrine:migrations:migrate');
$input = new ArrayInput(['--allow-no-migration' => true, '']);
$input->setInteractive(false);
$quietOutput = new ConsoleOutput(OutputInterface::VERBOSITY_QUIET);
$command->run($input, $quietOutput); |
I can confirm this. We run it the same way and get the error. |
Ok it's yet another thing to fix in the listener, not sure how the event system behaves in the case of nested commands. Can you check how many times the listener is called? |
And then there are 133 calls to |
Ah, if it's called once, then I don't foresee an easy solution to this. |
Can you let me know if #587 fixes the issue? |
Yes, it does! |
Bug Report
Summary
After upgrading from 3.3.1 to 3.4.0 our migrations fail with
Full output and trace
I could not find any upgrade notes that would hint this could happen in this minor update. Nor could I see anything obvious in the code changes between 3.3.1 and 3.4.0.
Is this a bug or did we something wrong?
We have a few middlewares registered, but they don't appear to be relevant here. And our custom SqlGenerator is not at play here, either.
Current behavior
Migrations table is tried to be created.
Expected behavior
Migrations table already exist and should not be created.
How to reproduce
Our config
The text was updated successfully, but these errors were encountered: