mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
Problem with mapper #5657
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @tasselchof on GitHub (Aug 29, 2017).
Hello!
Somehow mapper is duplicating queries on orm:schema-tool:update --dump-sql command with latest PostgreSQL.
I have repeatedly for each jsonb field queries:
ALTER TABLE table ALTER jsonb TYPE JSONB;
ALTER TABLE table ALTER jsonb DROP DEFAULT;
@lcobucci commented on GitHub (Aug 29, 2017):
@tasselchof can it be somehow related to https://github.com/doctrine/dbal/pull/2782#issuecomment-322246167? If so, we should keep it only on dbal.
I haven't had the time to take a look on the options (rather than just reverting that specific commit) but if would be really nice to have some help over there.
@stof commented on GitHub (Sep 7, 2017):
@lcobucci this is indeed the DBAL issue.
@lcobucci commented on GitHub (Sep 7, 2017):
@stof thanks! I'm in Brazil right now and am not really being able to work on this but I'll go back home in this weekend 😉
@lcobucci commented on GitHub (Sep 11, 2017):
@tasselchof being fixed on https://github.com/doctrine/dbal/pull/2855
@tasselchof commented on GitHub (Sep 14, 2017):
The same thing happening with indexes with cases:
DROP INDEX si_type_unique_idx;
CREATE UNIQUE INDEX si_type_unique_idx ON storage_items (warehouse_id, sku) WHERE state IS NOT NULL AND state = 'unique';
@lcobucci commented on GitHub (Nov 19, 2017):
@tasselchof https://github.com/doctrine/dbal/releases/tag/v2.6.3 has just been released, can you please check if things are working fine now?
@tasselchof commented on GitHub (Nov 19, 2017):
Yes, I saw this, but it didn't helped, still:
DROP INDEX si_type_unique_idx;
CREATE UNIQUE INDEX si_type_unique_idx ON storage_items (warehouse_id, sku) WHERE state IS NOT NULL AND state = 'unique';
@lcobucci commented on GitHub (Nov 19, 2017):
@tasselchof humm, can you try to submit a PR on DBAL with a test that reproduces it? You can use this as example:
8c1e513693/tests/Doctrine/Tests/DBAL/Functional/Schema/SchemaManagerFunctionalTestCase.php (L1206-L1336)@tasselchof commented on GitHub (Nov 19, 2017):
I'll do it in the middle of the week.
Actually, I opened an issue about indexes here: https://github.com/doctrine/dbal/issues/2913.
This one was at first place about jsonb field, which is ok now.