Index: DataDict/Pgsql.php =================================================================== --- DataDict/Pgsql.php (revision 7696) +++ DataDict/Pgsql.php (working copy) @@ -649,6 +649,7 @@ return $name . ' ' . $this->getNativeDeclaration($field); } + $unique = (isset($field['unique']) && $field['unique']) ? ' UNIQUE' : ''; $default = ''; if (array_key_exists('default', $field)) { if ($field['default'] === '') { @@ -668,7 +669,7 @@ $notnull = empty($field['notnull']) ? '' : ' NOT NULL'; $name = $this->conn->quoteIdentifier($name, true); - return $name . ' ' . $this->getNativeDeclaration($field) . $default . $notnull; + return $name . ' ' . $this->getNativeDeclaration($field) . $default . $unique . $notnull; } /**