[ticket/14532] Do not escape column default in mssql

The column default shouldn't be escaped for mssql. This is a regression
from 743d816631. Prior to that commit, the
default value for the column was not escaped. Escaping it will cause SQL
errors while altering columns.

PHPBB3-14532
This commit is contained in:
Marc Alexander 2016-03-31 16:07:05 +02:00
parent 3f5a873e4c
commit 48283d7c62

View file

@ -2340,7 +2340,7 @@ class tools
if (!empty($column_data['default']))
{
// Add new default value constraint
$statements[] = 'ALTER TABLE [' . $table_name . '] ADD CONSTRAINT [DF_' . $table_name . '_' . $column_name . '_1] ' . $this->db->sql_escape($column_data['default']) . ' FOR [' . $column_name . ']';
$statements[] = 'ALTER TABLE [' . $table_name . '] ADD CONSTRAINT [DF_' . $table_name . '_' . $column_name . '_1] ' . $column_data['default'] . ' FOR [' . $column_name . ']';
}
if (!empty($indexes))