Skip to content

Commit

Permalink
Start adding binaryuuid support.
Browse files Browse the repository at this point in the history
  • Loading branch information
dereuromark committed Apr 10, 2020
1 parent 6cc5558 commit 08d1e7f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Phinx/Db/Adapter/MysqlAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -892,6 +892,8 @@ public function getSqlType($type, $limit = null)
return ['name' => 'text'];
case static::PHINX_TYPE_BINARY:
return ['name' => 'binary', 'limit' => $limit ?: 255];
case static::PHINX_TYPE_BINARYUUID:
return ['name' => 'binary', 'limit' => 16];
case static::PHINX_TYPE_VARBINARY:
return ['name' => 'varbinary', 'limit' => $limit ?: 255];
case static::PHINX_TYPE_BLOB:
Expand Down Expand Up @@ -1290,7 +1292,7 @@ public function describeTable($tableName)
*/
public function getColumnTypes()
{
return array_merge(parent::getColumnTypes(), ['enum', 'set', 'year', 'json']);
return array_merge(parent::getColumnTypes(), ['enum', 'set', 'year', 'json', 'binaryuuid']);
}

/**
Expand Down

0 comments on commit 08d1e7f

Please sign in to comment.