简体   繁体   中英

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).

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()

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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