From 7481c387590ec08eaf433eb5bfaff183f8ce8645 Mon Sep 17 00:00:00 2001 From: David Grudl Date: Fri, 23 Mar 2018 12:09:34 +0100 Subject: [PATCH] reflection: removed Column::isUnsigned() (BC break) --- src/Dibi/Drivers/MsSqlReflector.php | 1 - src/Dibi/Drivers/MySqlReflector.php | 1 - src/Dibi/Drivers/SqlsrvReflector.php | 1 - src/Dibi/Reflection/Column.php | 7 ------- 4 files changed, 10 deletions(-) diff --git a/src/Dibi/Drivers/MsSqlReflector.php b/src/Dibi/Drivers/MsSqlReflector.php index a04964b5..e0aa1394 100644 --- a/src/Dibi/Drivers/MsSqlReflector.php +++ b/src/Dibi/Drivers/MsSqlReflector.php @@ -116,7 +116,6 @@ class MsSqlReflector implements Dibi\Reflector 'table' => $table, 'nativetype' => $type, 'size' => $size, - 'unsigned' => null, 'nullable' => $row['IS_NULLABLE'] === 'YES', 'default' => $row['COLUMN_DEFAULT'], 'autoincrement' => false, diff --git a/src/Dibi/Drivers/MySqlReflector.php b/src/Dibi/Drivers/MySqlReflector.php index 16e939eb..7f82e1ce 100644 --- a/src/Dibi/Drivers/MySqlReflector.php +++ b/src/Dibi/Drivers/MySqlReflector.php @@ -61,7 +61,6 @@ class MySqlReflector implements Dibi\Reflector 'table' => $table, 'nativetype' => strtoupper($type[0]), 'size' => isset($type[1]) ? (int) $type[1] : null, - 'unsigned' => (bool) strstr($row['Type'], 'unsigned'), 'nullable' => $row['Null'] === 'YES', 'default' => $row['Default'], 'autoincrement' => $row['Extra'] === 'auto_increment', diff --git a/src/Dibi/Drivers/SqlsrvReflector.php b/src/Dibi/Drivers/SqlsrvReflector.php index 1d80b090..381e4c10 100644 --- a/src/Dibi/Drivers/SqlsrvReflector.php +++ b/src/Dibi/Drivers/SqlsrvReflector.php @@ -86,7 +86,6 @@ class SqlsrvReflector implements Dibi\Reflector 'table' => $table, 'nativetype' => strtoupper($row['DATA_TYPE']), 'size' => $row['CHARACTER_MAXIMUM_LENGTH'], - 'unsigned' => true, 'nullable' => $row['IS_NULLABLE'] === 'YES', 'default' => $row['COLUMN_DEFAULT'], 'autoincrement' => $autoIncrements[$row['COLUMN_NAME']], diff --git a/src/Dibi/Reflection/Column.php b/src/Dibi/Reflection/Column.php index 10a4de56..aaa6e490 100644 --- a/src/Dibi/Reflection/Column.php +++ b/src/Dibi/Reflection/Column.php @@ -21,7 +21,6 @@ use Dibi; * @property-read string $type * @property-read mixed $nativeType * @property-read int|null $size - * @property-read bool|null $unsigned * @property-read bool|null $nullable * @property-read bool|null $autoIncrement * @property-read mixed $default @@ -95,12 +94,6 @@ class Column } - public function isUnsigned(): ?bool - { - return isset($this->info['unsigned']) ? (bool) $this->info['unsigned'] : null; - } - - public function isNullable(): ?bool { return isset($this->info['nullable']) ? (bool) $this->info['nullable'] : null;