public function modifyTable()
    {
        $table = $this->getTable();

        if (!$table->hasColumn($this->getParameter('slug_column'))) {
            $table->addColumn([
                'name'     => $this->getParameter('slug_column'),
                'type'     => 'VARCHAR',
                'size'     => 255,
                'required' => false,
            ]);
            // add a unique to column
            if ('true' === $this->getParameter('unique_constraint')) {
                $this->addUniqueConstraint($table);
            }
        }
    }
public function modifyTable()
    {
        $table = $this->getTable();

        if (!$table->hasColumn($this->getParameter('slug_column'))) {
            $table->addColumn([
                'name'     => $this->getParameter('slug_column'),
                'type'     => 'VARCHAR',
                'size'     => 255,
                'required' => false,
            ]);
            // add a unique to column
            if ('true' === $this->getParameter('unique_constraint')) {
                $this->addUniqueConstraint($table);
            }
        }
    }
public function modifyTable ( ) { $ table = $ this -> getTable ( ) ; if ( ! $ table -> hasColumn ( $ this -> getParameter ( 'slug_column' ) ) ) { $ table -> addColumn ( [ 'name' => $ this -> getParameter ( 'slug_column' ) , 'type' => 'VARCHAR' , 'size' => 255 , 'required' => false , ] ) ; // add a unique to column if ( 'true' === $ this -> getParameter ( 'unique_constraint' ) ) { $ this -> addUniqueConstraint ( $ table ) ; } } }
Adds the slug_column to the current table.
Adds the slug_column to the current table .