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