public function addPrimaryKey($name, $target, $table = null)
    {
        return $this->db->alterTable($this->getTable($table))
                        ->addConstraint($name)
                        ->primaryKey($target)
                        ->execute();
    }
public function addPrimaryKey($name, $target, $table = null)
    {
        return $this->db->alterTable($this->getTable($table))
                        ->addConstraint($name)
                        ->primaryKey($target)
                        ->execute();
    }
public function addPrimaryKey ( $ name , $ target , $ table = null ) { return $ this -> db -> alterTable ( $ this -> getTable ( $ table ) ) -> addConstraint ( $ name ) -> primaryKey ( $ target ) -> execute ( ) ; }
Adds a primary key

@param string $name PK's name
@param string|array $target Column name or collection of ones
@param string $table Table name. By default it uses mapper's table
@return boolean
Adds a primary key