简体   繁体   English

如何在迁移文件laravel 9中设置整数字段值限制的大小

[英]how to set size of integer fields value limit in migration file laravel 9

how to set size of integer fields value limit in migration file of Laravel (7,8,9).如何在 Laravel (7,8,9) 的迁移文件中设置整数字段值的大小限制。

I am trying this code.我正在尝试这段代码。 but it's not work但这行不通

        $table->id();
        $table->string('name');
        $table->integer('ISBN_no',15);

You can't do this, but you can use different types of integer as shown bellow:你不能这样做,但你可以使用不同类型的整数,如下所示:

$table->tinyInteger() $table->smallInteger() $table->integer() $table->mediumInteger() $table->bigInteger() $table->tinyInteger() $table->smallInteger() >smallInteger() $table- $table->integer() $table->mediumInteger() $table->bigInteger()

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM