You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 16, 2021. It is now read-only.
Just migrated to Laravel 5.6, and found that morph methods in Schema\Blueprint have been changed to use unsigned big integer: morphs() & nullableMorphs by commit.
This change breaks a lot! And I don't think it could be easy or reasonable to change existing system for this. If this change has to be kept, it should provide a parameter to determine the type of column to be used.
To my case, the related columns of the morph targets are all auto increment unsigned integer primary key columns. I don't want to bring the INT vs BIGINTauto increment primary key argument here. The short answer is we can't change those primary keys to BIGINT.
My current work around is changing our migrations to alter the column type right after the Schema::create() call, and adds foreign key afterward.
Description:
Just migrated to Laravel 5.6, and found that morph methods in
Schema\Blueprint
have been changed to use unsigned big integer:morphs()
&nullableMorphs
by commit.This change breaks a lot! And I don't think it could be easy or reasonable to change existing system for this. If this change has to be kept, it should provide a parameter to determine the type of column to be used.
To my case, the related columns of the morph targets are all auto increment unsigned integer primary key columns. I don't want to bring the
INT
vsBIGINT
auto increment
primary key argument here. The short answer is we can't change those primary keys toBIGINT
.My current work around is changing our migrations to alter the column type right after the
Schema::create()
call, and adds foreign key afterward.Originally posted on laravel/framework#23935
The text was updated successfully, but these errors were encountered: