mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-27 21:58:52 +00:00
[ticket/13117] Correctly define auto increment columns as "NOT NULL" on mysql
Unintended change from 95ab4b3e93
PHPBB3-13117
This commit is contained in:
parent
71ac6ab2b8
commit
bc24c78e06
1 changed files with 1 additions and 1 deletions
|
@ -1512,7 +1512,7 @@ class tools
|
||||||
$sql .= (strpos($column_data[1], '0x') === 0) ? "DEFAULT {$column_data[1]} " : "DEFAULT '{$column_data[1]}' ";
|
$sql .= (strpos($column_data[1], '0x') === 0) ? "DEFAULT {$column_data[1]} " : "DEFAULT '{$column_data[1]}' ";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!is_null($column_data[1]))
|
if (!is_null($column_data[1]) || (isset($column_data[2]) && $column_data[2] == 'auto_increment'))
|
||||||
{
|
{
|
||||||
$sql .= 'NOT NULL';
|
$sql .= 'NOT NULL';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue