From 8488e5ec497cd3b970170e668be214e7bab205be Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Fri, 27 Sep 2019 17:08:33 +0200 Subject: [PATCH] Fix minimum/maximum lengths of db columns --- .../database/table/column/BinaryDatabaseTableColumn.class.php | 2 +- .../database/table/column/CharDatabaseTableColumn.class.php | 2 +- .../database/table/column/IntDatabaseTableColumn.class.php | 2 +- .../database/table/column/TLengthDatabaseTableColumn.class.php | 2 +- .../database/table/column/VarcharDatabaseTableColumn.class.php | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/wcfsetup/install/files/lib/system/database/table/column/BinaryDatabaseTableColumn.class.php b/wcfsetup/install/files/lib/system/database/table/column/BinaryDatabaseTableColumn.class.php index 4b1189a437..a3b5ef65f5 100644 --- a/wcfsetup/install/files/lib/system/database/table/column/BinaryDatabaseTableColumn.class.php +++ b/wcfsetup/install/files/lib/system/database/table/column/BinaryDatabaseTableColumn.class.php @@ -29,6 +29,6 @@ class BinaryDatabaseTableColumn extends AbstractDatabaseTableColumn implements I * @inheritDoc */ public function getMinimumLength() { - return 0; + return 1; } } diff --git a/wcfsetup/install/files/lib/system/database/table/column/CharDatabaseTableColumn.class.php b/wcfsetup/install/files/lib/system/database/table/column/CharDatabaseTableColumn.class.php index 14b4ba7902..1b959e8e59 100644 --- a/wcfsetup/install/files/lib/system/database/table/column/CharDatabaseTableColumn.class.php +++ b/wcfsetup/install/files/lib/system/database/table/column/CharDatabaseTableColumn.class.php @@ -29,6 +29,6 @@ class CharDatabaseTableColumn extends AbstractDatabaseTableColumn implements ILe * @inheritDoc */ public function getMinimumLength() { - return 0; + return 1; } } diff --git a/wcfsetup/install/files/lib/system/database/table/column/IntDatabaseTableColumn.class.php b/wcfsetup/install/files/lib/system/database/table/column/IntDatabaseTableColumn.class.php index 8a3ab91257..60aad6207e 100644 --- a/wcfsetup/install/files/lib/system/database/table/column/IntDatabaseTableColumn.class.php +++ b/wcfsetup/install/files/lib/system/database/table/column/IntDatabaseTableColumn.class.php @@ -20,6 +20,6 @@ class IntDatabaseTableColumn extends AbstractIntDatabaseTableColumn { * @inheritDoc */ public function getMaximumLength() { - return 11; + return 10; } } diff --git a/wcfsetup/install/files/lib/system/database/table/column/TLengthDatabaseTableColumn.class.php b/wcfsetup/install/files/lib/system/database/table/column/TLengthDatabaseTableColumn.class.php index eb614fe994..d6b6655f2e 100644 --- a/wcfsetup/install/files/lib/system/database/table/column/TLengthDatabaseTableColumn.class.php +++ b/wcfsetup/install/files/lib/system/database/table/column/TLengthDatabaseTableColumn.class.php @@ -34,7 +34,7 @@ trait TLengthDatabaseTableColumn { * @return null|int */ public function getMinimumLength() { - return 0; + return null; } /** diff --git a/wcfsetup/install/files/lib/system/database/table/column/VarcharDatabaseTableColumn.class.php b/wcfsetup/install/files/lib/system/database/table/column/VarcharDatabaseTableColumn.class.php index 58d6bf2ce7..2e18e5ed82 100644 --- a/wcfsetup/install/files/lib/system/database/table/column/VarcharDatabaseTableColumn.class.php +++ b/wcfsetup/install/files/lib/system/database/table/column/VarcharDatabaseTableColumn.class.php @@ -29,6 +29,6 @@ class VarcharDatabaseTableColumn extends AbstractDatabaseTableColumn implements * @inheritDoc */ public function getMinimumLength() { - return 0; + return 1; } } -- 2.20.1