src/Database/Column.php
public function primary()
    {
        $key = $this->tableHasPrimary()->getPrimaryKey();
        $message = "The column {$this->name} is not a primary key.";

        return $this->assertTrue(in_array($this->name, $key->getColumns()), $message)
                    ->assertTrue($key->isPrimary())
                    ->assertTrue($key->isUnique());
    }
public function primary()
    {
        $key = $this->tableHasPrimary()->getPrimaryKey();
        $message = "The column {$this->name} is not a primary key.";

        return $this->assertTrue(in_array($this->name, $key->getColumns()), $message)
                    ->assertTrue($key->isPrimary())
                    ->assertTrue($key->isUnique());
    }
public function primary ( ) { $ key = $ this -> tableHasPrimary ( ) -> getPrimaryKey ( ) ; $ message = "The column {$this->name} is not a primary key." ; return $ this -> assertTrue ( in_array ( $ this -> name , $ key -> getColumns ( ) ) , $ message ) -> assertTrue ( $ key -> isPrimary ( ) ) -> assertTrue ( $ key -> isUnique ( ) ) ; }
Assert that the column is a primary key.

@return $this
Assert that the column is a primary key .