Fix minimum/maximum lengths of db columns
authorMatthias Schmidt <gravatronics@live.com>
Fri, 27 Sep 2019 15:08:33 +0000 (17:08 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Fri, 27 Sep 2019 15:08:33 +0000 (17:08 +0200)
wcfsetup/install/files/lib/system/database/table/column/BinaryDatabaseTableColumn.class.php
wcfsetup/install/files/lib/system/database/table/column/CharDatabaseTableColumn.class.php
wcfsetup/install/files/lib/system/database/table/column/IntDatabaseTableColumn.class.php
wcfsetup/install/files/lib/system/database/table/column/TLengthDatabaseTableColumn.class.php
wcfsetup/install/files/lib/system/database/table/column/VarcharDatabaseTableColumn.class.php

index 4b1189a437c3ba75553f300e48a2f048efc352e4..a3b5ef65f537a62b1628394545e8c3cc46530477 100644 (file)
@@ -29,6 +29,6 @@ class BinaryDatabaseTableColumn extends AbstractDatabaseTableColumn implements I
         * @inheritDoc
         */
        public function getMinimumLength() {
-               return 0;
+               return 1;
        }
 }
index 14b4ba79024ea36eee8ff5a2d1a9c58680a5c5eb..1b959e8e59806b901127417feb66d546faf2d67d 100644 (file)
@@ -29,6 +29,6 @@ class CharDatabaseTableColumn extends AbstractDatabaseTableColumn implements ILe
         * @inheritDoc
         */
        public function getMinimumLength() {
-               return 0;
+               return 1;
        }
 }
index 8a3ab91257b795e7d0558d173aeeebb65a4af687..60aad6207e0bc6fe10961231dd57a6ea1cb0d5eb 100644 (file)
@@ -20,6 +20,6 @@ class IntDatabaseTableColumn extends AbstractIntDatabaseTableColumn {
         * @inheritDoc
         */
        public function getMaximumLength() {
-               return 11;
+               return 10;
        }
 }
index eb614fe994e44410645b72b2459637ef6d642423..d6b6655f2ed790814b9f88dd99062ba1fac2e5aa 100644 (file)
@@ -34,7 +34,7 @@ trait TLengthDatabaseTableColumn {
         * @return      null|int
         */
        public function getMinimumLength() {
-               return 0;
+               return null;
        }
        
        /**
index 58d6bf2ce7a6b7b81f52b4d513f7db7fe032374b..2e18e5ed82ae639dc757ea3257afe6d6f41174e7 100644 (file)
@@ -29,6 +29,6 @@ class VarcharDatabaseTableColumn extends AbstractDatabaseTableColumn implements
         * @inheritDoc
         */
        public function getMinimumLength() {
-               return 0;
+               return 1;
        }
 }