migrations
migrations copied to clipboard
Apply assets filter on sequences
| Q | A |
|---|---|
| Type | improvement |
| BC Break | no |
| Fixed issues |
Summary
Asset filter is used for tables and sequences on fromSchema, but only for tables on toSchema. It generates CREATE SEQUENCE migration query. This PR applies the filter for sequences on toSchema.
Thank you for the PR, @ottaviano. Did you run into a specific problem that resulted into this change?
@SenseException,
I have a partitioned table project_result_item with 3 sub-tables: project_result_item_0, project_result_item_1, and project_result_item_2.
When I run the doctrine:migration:diff command, it tries to drop the 3 sub-tables.
The "solution" I found is to completely ignore the project_result_item table with schema_filter, but Doctrine migration generates the sequence for the ignored table at every diff :
CREATE SEQUENCE project_result_item_id_seq INCREMENT BY 1 MINVALUE 1 START 1
This happens because the filter does not apply to sequences during the toSchema phase.