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

doctrine:migrations:diff generates DROP SEQUENCE messenger_messages_id_seq #461

Open
Gemorroj opened this issue Dec 17, 2021 · 6 comments
Open

Comments

@Gemorroj
Copy link

Gemorroj commented Dec 17, 2021

After run doctrine:migrations:diff it generates

$this->addSql('DROP SEQUENCE schema.messenger_messages_id_seq CASCADE');

It bug relates to #355 but the solution schema_filter: ~^(?!messenger_messages)~ doesn't help

im use postgres

@murman-lexus
Copy link

Hi! I have the same problem.

I hope problem with schema
i'm tryed to change my_schema -> public
and problem was solved, but I need use schema....

@brettins
Copy link

brettins commented Jun 2, 2022

I'm also experiencing this. Every migration diff tries to drop some sequence tokens and I don't know what changed other than upgrading to the latest doctrine. Also in postgres.

@florianajir
Copy link

On my setup at each doctrine:migration:diff it adds me twice the lines creating the table messenger_messages

@BernardA
Copy link

BernardA commented Aug 7, 2022

I do have the same issue. I reported it on this related issue. .

Not only does it drop the sequences on up, but it also recreates them on down and additionally recreates the schemas.

Note that the issue of dropping SEQUENCES only happens when there's a custom SCHEMA.

The full code is available on this repository.

@MkLHX
Copy link

MkLHX commented Mar 8, 2023

Hi there,

Still encountering the issue in my project and I need to use multiple schemas on PostgreSQL.

My project stack is as follows:

SF 6.1.12
PHP 8.1.9
"doctrine/doctrine-bundle": "^2.7",
"avaibooksports/doctrine-migrations-multiple-database-bundle": "^0.3.4",

4 Entity Managers/Connection
4 PostgreSQL databases on docker postgis/postgis:14-3.3

When I apply a migration on all or one database, with custom schemas, the table's sequences are dropped.

I really can't move custom schemas tables to the public schema to much work is already done with custom schemas.

Did you find any workaround to manage migrations and keep sequences when applied?

@florianajir
Copy link

4 Entity Managers/Connection 4 PostgreSQL databases on docker postgis/postgis:14-3.3

Having the issue using postgis / docker too, maybe it is related

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

6 participants