diff options
| author | Nils Adermann <naderman@naderman.de> | 2014-09-30 14:00:02 +0200 |
|---|---|---|
| committer | Nils Adermann <naderman@naderman.de> | 2014-09-30 14:00:02 +0200 |
| commit | f1ab6f31a1f54466cf317a21f0f76fca77bff2fa (patch) | |
| tree | 9406387cfba9001459adcabf0185297747fe556b /phpBB/phpbb/db/tools.php | |
| parent | 6f093ade8a025039c04e88c473e619153656c6a7 (diff) | |
| parent | bc24c78e06f9b16e4d4ca6ffad1944ee1312f254 (diff) | |
| download | forums-f1ab6f31a1f54466cf317a21f0f76fca77bff2fa.tar forums-f1ab6f31a1f54466cf317a21f0f76fca77bff2fa.tar.gz forums-f1ab6f31a1f54466cf317a21f0f76fca77bff2fa.tar.bz2 forums-f1ab6f31a1f54466cf317a21f0f76fca77bff2fa.tar.xz forums-f1ab6f31a1f54466cf317a21f0f76fca77bff2fa.zip | |
Merge pull request #3003 from nickvergessen/ticket/13117
[ticket/13117] Correctly define auto increment columns as "NOT NULL" on mysql
Diffstat (limited to 'phpBB/phpbb/db/tools.php')
| -rw-r--r-- | phpBB/phpbb/db/tools.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/phpBB/phpbb/db/tools.php b/phpBB/phpbb/db/tools.php index 3567570137..0781d7425e 100644 --- a/phpBB/phpbb/db/tools.php +++ b/phpBB/phpbb/db/tools.php @@ -1512,7 +1512,7 @@ class tools $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'; } |
