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
name VARCHAR(255) NOT NULL,
is_unique TINYINT(1) NOT NULL,
SQL-dump created by SchemaTool:
name VARCHAR(255) DEFAULT NULL,
is_unique TINYINT(1) DEFAULT NULL,
This behaviour is problematic, especially for columns which are part of a unique constraint.
Reason:
SchemaTool doesn't really check for inherited fields in STI sub classes in method getSchemaFromMetadata() and passes all fields (incl. the inherited) to method _gatherColumn() where finally the column definition of the parent class will be overwritten.
Jira issue originally created by user ayhan:
Expected SQL-dump:
SQL-dump created by SchemaTool:
This behaviour is problematic, especially for columns which are part of a unique constraint.
Reason:
SchemaTool doesn't really check for inherited fields in STI sub classes in method getSchemaFromMetadata() and passes all fields (incl. the inherited) to method _gatherColumn() where finally the column definition of the parent class will be overwritten.
A quick fix:
Change that if-clause above to
Better fix:
Only pass not inherited fields to the _gatherColumn() method, as done with CTI sub classes.
The text was updated successfully, but these errors were encountered: