From: Matthias Schmidt Date: Fri, 27 Sep 2019 15:08:33 +0000 (+0200) Subject: Fix minimum/maximum lengths of db columns X-Git-Tag: 5.2.0_Beta_2~29^2~2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8488e5ec497cd3b970170e668be214e7bab205be;p=GitHub%2FWoltLab%2FWCF.git Fix minimum/maximum lengths of db columns --- 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; } }