Defined in: yii\db\SchemaBuilderTrait::primaryKey()
Creates a primary key column.
public yii\db\ColumnSchemaBuilder primaryKey ( $length = null ) | ||
$length | integer|null |
Column size or precision definition. This parameter will be ignored if not supported by the DBMS. |
return | yii\db\ColumnSchemaBuilder |
The column instance which can be further customized. |
---|
public function primaryKey($length = null)
{
return $this->getDb()->getSchema()->createColumnSchemaBuilder(Schema::TYPE_PK, $length);
}
Signup or Login in order to comment.