Implement consistent behavior for ColumnDefinition::$defaultValue #19

Open
opened 2026-10-26 17:03:02 +01:00 by c.fahner · 0 comments
Owner

Currently the $defaultValue of ColumnDefinition property gets filled differently depending on whether or not the ColumnDefinition is created from an INFORMATION_SCHEMA.COLUMNS row or a schema field.

The information schema row can contain expressions, such as concat('a', 'b') or quoted literal strings (see the docs for examples), while the schema field's default value comes from a PHP value (which is always a literal).

Since this would lead to issues during schema upgrades, this difference needs to be resolved.

Currently the `$defaultValue` of `ColumnDefinition` property gets filled differently depending on whether or not the `ColumnDefinition` is created from an `INFORMATION_SCHEMA.COLUMNS` row or a schema field. The information schema row can contain expressions, such as `concat('a', 'b')` or quoted literal strings ([see the docs](https://mariadb.com/docs/server/reference/system-tables/information-schema/information-schema-tables/information-schema-columns-table) for examples), while the schema field's default value comes from a PHP value (which is always a literal). Since this would lead to issues during schema upgrades, this difference needs to be resolved.
c.fahner changed title from Handle ColumnDefinition::$defaultValue properly to Implement consistent behavior for ColumnDefinition::$defaultValue 2026-10-26 17:03:36 +01:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
slendium/ocd-mariadb#19
No description provided.