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
When I create a users table with id of ulid type, I get an issue with assigning role or permission to user.
The error states that :
SQLSTATE[01000]: Warning: 1265 Data truncated for column 'model_id' at row 1 (SQL: insert into model_has_roles (model_id, model_ty pe, role_id) values (01hmhx0f95bbw2xg2t6vsxp65s, App\Models\User, 1))SQLSTATE[01000]: Warning: 1265 Data truncated for column 'model
_id' at row 1 (SQL: insert into model_has_roles (model_id, model_type, role_id) values (01hmhx0f9q43g7zf3mxeywn64x, App\Models
User, 2))
When I check the create_permission_tables migration, I notice for exemple, at create model_has_roles table, the model_morph_key is of type unsignedBigInteger !
But when I decide to change the type to string, it works fine, like here.
But I noticed at the same time, this issue is not there when using sqlite as database !
I know what I have done is a hack. Is there a better way of solving this issue ?
The text was updated successfully, but these errors were encountered:
because this issue seems to be inactive for quite some time now, I've automatically closed it. If you feel this issue deserves some attention from my human colleagues feel free to reopen it.
When I create a
users
table withid
of ulid type, I get an issue with assigning role or permission to user.The error states that :
When I check the create_permission_tables migration, I notice for exemple, at create
model_has_roles
table, themodel_morph_key
is of typeunsignedBigInteger
!But when I decide to change the type to
string
, it works fine, like here.But I noticed at the same time, this issue is not there when using sqlite as database !
I know what I have done is a hack. Is there a better way of solving this issue ?
The text was updated successfully, but these errors were encountered: