You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ALTER TABLE data MODIFY id INT NOT NULL;
DROP INDEX data_unique ON data;
ALTER TABLE data DROP PRIMARY KEY;
ALTER TABLE data DROP id, CHANGE channel_id channel_id INT NOT NULL;
ALTER TABLE data ADD PRIMARY KEY (channel_id, timestamp);
The plan fails intermittendly due to
In PDOConnection.php line 132:
[PDOException (HY000)]
SQLSTATE[HY000]: General error: 1832 Cannot change column 'channel_id': used in a foreign key constraint 'FK_ADF3F36372F5A1AA'
It seems that ManyToOne Fk relation is not handled properly when changing the underlying columns.
The text was updated successfully, but these errors were encountered:
@greg0ire this is not a duplicate. #8750 is about planning redundant schema updates while this issue is about planning schema updates that will fail as constraints are not taken into account.
I'm converting the following entity from using dedicated PK to composite PK by removing the id column. From:
To:
This creates the following execution plan:
The plan fails intermittendly due to
It seems that
ManyToOne
Fk relation is not handled properly when changing the underlying columns.The text was updated successfully, but these errors were encountered: