プライマリキー列を作成します。
| public yii\db\ColumnSchemaBuilder primaryKey ( $length = null ) | ||
| $length | integer|null |
列サイズまたは精度の定義。DBMS でサポートされていない場合は、このパラメーターは無視されます。 |
| 戻り値 | yii\db\ColumnSchemaBuilder |
さらにカスタマイズできる列インスタンス。 |
|---|---|---|
public function primaryKey($length = null)
{
return $this->getDb()->getSchema()->createColumnSchemaBuilder(Schema::TYPE_PK, $length);
}
サインアップ または ログイン してコメントしてください。