- πΊπΈUnited States smustgrave
Since there hasn't been a follow up to #15 going to close for now
If still an issue please reopen.
Thanks all
If you try to define a Field with a default value that contains a brace (for example a string literal 'a:{}') prefixTables() in Connection.php
will strip them out (or even prefix them!).
This is because the statement used to create and alter fields uses the DEFAULT literal (because there is no way PDO will let you bind parameters to an ALTER TABLE or CREATE TABLE statement):
// $spec['default'] can be NULL, so we explicitly check for the key here.
if (array_key_exists('default', $spec)) {
$sql .= ' DEFAULT ' . $this->escapeDefaultValue($spec['default']);
}
This is already fixed in the MSSQL server driver for 7.x, but this bug affects both 7.x and 8.x of drupal core.
Just reporting this if someone wants to fix it on the core database drivers. What I did on the MSSQL driver was to embed the table prefixing logic into the query generation, and then skip prefixTables().
Probably prefixTables() could be replaced by regex logic to overcome the issue.
Closed: outdated
9.5
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Since there hasn't been a follow up to #15 going to close for now
If still an issue please reopen.
Thanks all