Gdn_DatabaseStructure::primaryKey PHP Method

primaryKey() public method

Defines a primary key column on a table.
public primaryKey ( string $Name, string $Type = 'int' ) : Gdn_DatabaseStructure
$Name string The name of the column.
$Type string The data type of the column.
return Gdn_DatabaseStructure $this.
    public function primaryKey($Name, $Type = 'int')
    {
        $Column = $this->_createColumn($Name, $Type, false, null, 'primary');
        $Column->AutoIncrement = true;
        $this->_Columns[$Name] = $Column;
        return $this;
    }