mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
[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:
parent
3f5a873e4c
commit
48283d7c62
1 changed files with 1 additions and 1 deletions
|
@ -2340,7 +2340,7 @@ class tools
|
||||||
if (!empty($column_data['default']))
|
if (!empty($column_data['default']))
|
||||||
{
|
{
|
||||||
// Add new default value constraint
|
// 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))
|
if (!empty($indexes))
|
||||||
|
|
Loading…
Add table
Reference in a new issue