Dumplie\Metadata\Infrastructure\Doctrine\Dbal\Field\IntegerMapping::map PHP Méthode

map() public méthode

public map ( string $schema, Doctrine\DBAL\Schema\Table $table, string $name, Dumplie\Metadata\Schema\FieldDefinition $definition )
$schema string
$table Doctrine\DBAL\Schema\Table
$name string
$definition Dumplie\Metadata\Schema\FieldDefinition
    public function map(string $schema, Table $table, string $name, FieldDefinition $definition)
    {
        $table->addColumn($name, 'integer', ['notnull' => !$definition->isNullable(), 'default' => $definition->defaultValue(), 'unique' => $definition->options()['unique'] ?? false]);
        if ($definition->options()['index'] ?? false) {
            $table->addIndex([$name]);
        }
    }
IntegerMapping