Creates a primary key column.
| public yii\ | ||
| $length | integer|null |
Column size or precision definition. This parameter will be ignored if not supported by the DBMS. |
| return | yii\ |
The column instance which can be further customized. |
|---|---|---|
public function primaryKey($length = null)
{
return $this->getDb()->getSchema()->createColumnSchemaBuilder(Schema::TYPE_PK, $length);
}
User Contributed Notes
Leave a comment
Join the conversation to share a note.