Postgres UUIDs are _already_ binary compatible. In postgres binaryuuid and standard uuid map to the same SQL data type. Postgres does not support lengths on its BYTEA field so UUID is our best option here.
@@ -354,6 +354,7 @@ class PostgresSchema extends BaseSchema
$typeMap = [
TableSchema::TYPE_TINYINTEGER => ' SMALLINT',
TableSchema::TYPE_SMALLINTEGER => ' SMALLINT',
+ TableSchema::TYPE_BINARY_UUID => ' UUID',
TableSchema::TYPE_BINARY => ' BYTEA',
TableSchema::TYPE_BOOLEAN => ' BOOLEAN',
TableSchema::TYPE_FLOAT => ' FLOAT',
@@ -665,6 +665,11 @@ SQL;
'"id" UUID NOT NULL'
],
[
+ 'id',
+ ['type' => 'binaryuuid', 'length' => null, 'null' => false],
+ '"id" UUID NOT NULL'
+ ],
+ [
'role',
['type' => 'string', 'length' => 10, 'null' => false, 'default' => 'admin'],
'"role" VARCHAR(10) NOT NULL DEFAULT \'admin\''