Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign up[5.8] use bigIncrements by default #4946
Conversation
All new migrations will be using bigIncrements laravel/framework#26472
This comment has been minimized.
This comment has been minimized.
This needs to be documented here : https://laravel.com/docs/5.8/upgrade#upgrade-5.8.0 After updating from 5.7 this can result to an error if you use foreign_keys in your own migrations :
|
This comment has been minimized.
This comment has been minimized.
It’s not a breaking change because it only affects new migrations that
you create after updating.
You can then change the migration file to suit your own needs
|
This comment has been minimized.
This comment has been minimized.
I have the case, I updated from 5.7 to 5.8 by following the upgrade guide in a WIP project. By doing this all my packages have updated but not the migrations in the project's database folder. The error happens when running |
This comment has been minimized.
This comment has been minimized.
I fix it in the project folder, but I think that it's need to be documented. |
This comment has been minimized.
This comment has been minimized.
@sebastienheyd like @laurencei said, this only affects new migrations. It doesn't needs to be in the upgrade guide. It's in the changelog if you want to reference any changes to the skeleton. |
This comment has been minimized.
This comment has been minimized.
IMO there should be an |
This comment has been minimized.
This comment has been minimized.
@laurencei and @driesvints, it looks like it is a breaking change as @sebastienheyd said. Changes on migration stubs is not breaking but a little change in |
This comment has been minimized.
This comment has been minimized.
@yusufkandemir - its not breaking to an existing application. It is a change of behavior for new applications. But that's really the package incorrectly assuming it thought it knew what the There has always been a chance the If someone runs into this, they can change their own |
This comment has been minimized.
This comment has been minimized.
This is true, but it doesn't justify that the change isn't a BC. BC is
Which applies here. Nevertheless it's my turn to fix the package. |
This comment has been minimized.
This comment has been minimized.
@fulopattila122 you can't claim BC break in the skeleton. This file could have been modified by any Laravel user at any moment and would have broken your package (for them) already. The change in the skeleton just made abundantly clear that hooking a foreign key into a database you don't own is setting yourself for broken apps. |
All new generated migrations will be using
bigIncrements
see laravel/framework#26472
https://github.com/laravel/framework/blob/8107fe1d3769fdef35a8ccb85d9ff0d942380394/src/Illuminate/Database/Migrations/stubs/create.stub#L17