yii\db\SchemaBuilderTrait::primaryKey PHP 메소드

primaryKey() 공개 메소드

Creates a primary key column.
부터: 2.0.6
public primaryKey ( integer $length = null ) : ColumnSchemaBuilder
$length integer column size or precision definition. This parameter will be ignored if not supported by the DBMS.
리턴 ColumnSchemaBuilder the column instance which can be further customized.
    public function primaryKey($length = null)
    {
        return $this->getDb()->getSchema()->createColumnSchemaBuilder(Schema::TYPE_PK, $length);
    }