protected function addUniqueConstraint(Table $table)
    {
        $unique = new Unique($this->getColumnForParameter('slug_column'));
        $unique->setName($table->getCommonName() . '_slug');
        $unique->addColumn($table->getColumn($this->getParameter('slug_column')));
        if ($this->getParameter('scope_column')) {
            $unique->addColumn($table->getColumn($this->getParameter('scope_column')));
        }
        $table->addUnique($unique);
    }
protected function addUniqueConstraint(Table $table)
    {
        $unique = new Unique($this->getColumnForParameter('slug_column'));
        $unique->setName($table->getCommonName() . '_slug');
        $unique->addColumn($table->getColumn($this->getParameter('slug_column')));
        if ($this->getParameter('scope_column')) {
            $unique->addColumn($table->getColumn($this->getParameter('scope_column')));
        }
        $table->addUnique($unique);
    }
protected function addUniqueConstraint ( Table $ table ) { $ unique = new Unique ( $ this -> getColumnForParameter ( 'slug_column' ) ) ; $ unique -> setName ( $ table -> getCommonName ( ) . '_slug' ) ; $ unique -> addColumn ( $ table -> getColumn ( $ this -> getParameter ( 'slug_column' ) ) ) ; if ( $ this -> getParameter ( 'scope_column' ) ) { $ unique -> addColumn ( $ table -> getColumn ( $ this -> getParameter ( 'scope_column' ) ) ) ; } $ table -> addUnique ( $ unique ) ; }
Adds a unique constraint to the table to enforce uniqueness of the slug_column

@param Table $table
Adds a unique constraint to the table to enforce uniqueness of the slug_column