protected function generateColumn($name, $annotation)
    {
        // check if column type is valid
        $this->validator->validateColumnType($annotation->type);

        // add column
        return new ColumnDefinition([
            'name' => $annotation->name,
            'type' => $annotation->type,
            'nullable' => $annotation->nullable,
            'default' => $annotation->default,
            'primary' => $annotation->primary,
            'unique' => $annotation->unique,
            'index' => $annotation->index,
            'options' => $this->generateAttributeOptionsArray($annotation)
        ]);
    }
protected function generateColumn($name, $annotation)
    {
        // check if column type is valid
        $this->validator->validateColumnType($annotation->type);

        // add column
        return new ColumnDefinition([
            'name' => $annotation->name,
            'type' => $annotation->type,
            'nullable' => $annotation->nullable,
            'default' => $annotation->default,
            'primary' => $annotation->primary,
            'unique' => $annotation->unique,
            'index' => $annotation->index,
            'options' => $this->generateAttributeOptionsArray($annotation)
        ]);
    }
protected function generateColumn ( $ name , $ annotation ) { // check if column type is valid $ this -> validator -> validateColumnType ( $ annotation -> type ) ; // add column return new ColumnDefinition ( [ 'name' => $ annotation -> name , 'type' => $ annotation -> type , 'nullable' => $ annotation -> nullable , 'default' => $ annotation -> default , 'primary' => $ annotation -> primary , 'unique' => $ annotation -> unique , 'index' => $ annotation -> index , 'options' => $ this -> generateAttributeOptionsArray ( $ annotation ) ] ) ; }
Generate a column.

@param string $name
@param \ProAI\Datamapper\Annotations\Annotation $annotation
@return \ProAI\Datamapper\Metadata\Definitions\Column
Generate a column .