Cake\Database\Schema\PostgresSchema::_convertConstraint PHP Метод

_convertConstraint() защищенный Метод

Add/update a constraint into the schema object.
protected _convertConstraint ( Cake\Database\Schema\Table $table, string $name, string $type, array $row ) : void
$table Cake\Database\Schema\Table The table to update.
$name string The index name.
$type string The index type.
$row array The metadata record to update with.
Результат void
    protected function _convertConstraint($table, $name, $type, $row)
    {
        $constraint = $table->constraint($name);
        if (!$constraint) {
            $constraint = ['type' => $type, 'columns' => []];
        }
        $constraint['columns'][] = $row['attname'];
        $table->addConstraint($name, $constraint);
    }