From b028e536148f54225368b2e410fe8161a70aadde Mon Sep 17 00:00:00 2001 From: Sergey Romanov Date: Sun, 18 Oct 2015 04:15:34 +0600 Subject: [PATCH] Allow to pass table option signed for primary key Discussed in #657. Primary field by default have to be unsigned because for autoincrement this is only that makes sense. But just in case there is parameter that you can pass to change that. --- src/Phinx/Db/Adapter/MysqlAdapter.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Phinx/Db/Adapter/MysqlAdapter.php b/src/Phinx/Db/Adapter/MysqlAdapter.php index a180c7c68..fa89cd6a6 100644 --- a/src/Phinx/Db/Adapter/MysqlAdapter.php +++ b/src/Phinx/Db/Adapter/MysqlAdapter.php @@ -213,6 +213,7 @@ public function createTable(Table $table) $column = new Column(); $column->setName('id') ->setType('integer') + ->setSigned(isset($options['signed']) ? $options['signed'] : false) ->setIdentity(true); array_unshift($columns, $column);