How do you know?
Sep 15, 2022
9
Level 8
Why migration integer adds auto_increment and primary key?
I wanted to create some integer columns, but it automatically adds auto_increment and primary key:
$table->integer('some_col');
Why? there already is the $table->id(); at the top
Level 75
Second parameter of integer() is autoIncrement.
And the number 50 is like a true.
https://laravel.com/api/9.x/Illuminate/Database/Schema/Blueprint.html#method_integer
1 like
Please or to participate in this conversation.