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

Cache issue after migrate on change database connexion iteration #472

Open
gbourgeat opened this issue Feb 22, 2022 · 0 comments
Open

Cache issue after migrate on change database connexion iteration #472

gbourgeat opened this issue Feb 22, 2022 · 0 comments

Comments

@gbourgeat
Copy link

For multi worspaces usage with one database per workspace, I run a custom command for migrate worskaces databases who use command "doctrine:migration:migrate" in a loop with action to change database connexion between each iteration.

It seem not process change connexion (work for other tasks like other script who called "doctrine:schema:update --force" with changing database connexion between iterate) when have already execute a migration.

Exemple case with 3 worspaces so 3 databases with differente connexion configuration

  • If no migration to exec, no problem
  • If migration file for create a table exist:
    • migration was executed with sucess on first workspace
    • for 2nd and last, database error with error because table already exist

If I run one more time the script

  • 1st: no migrate to execute
  • 2nd: 1 migrate to execute and execute it with success
  • 3rd: 1 migrate to execute, database error with error because table already exist (but in pgadmin I see that table not exist)

So I should call 3 times the script for passed all migrates.

Change connexion working for check migrate in table "migration_version" but when execute php script migration, execute it on last database connexion who have been migrate executed with success.

I tried to run cache:clear, same doctrine cache clear (metadata and other) before called to migrate command and no change.

Need help for solution thanks

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

1 participant