We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem when trying to migrate laravel-permission migrations
Versions
PHP version: 8.3
Database version:
To Reproduce Steps to reproduce the behavior:
Create new laravel project with v10.48.4
composer create-project laravel/laravel:^10
install laravel permission v6.4
composer require spatie/laravel-permission:6.4
publish packege file
php artisan vendor:publish --provider="Spatie\Permission\PermissionServiceProvider"
Here is my example code and/or tests showing the problem in my app:
php artisan migrate
Expected behavior SQLSTATE[HY000]: General error: 1005 Can't create table Laravel.model_has_permissions (errno: 121 "Duplicate key on write or update") (Connection: mysql, SQL: alter table model_has_permissions add constraint model_has_permissions_permission_id_foreign foreign key (permission_id) references permissions (id) on delete cascade)
Laravel
model_has_permissions
model_has_permissions_permission_id_foreign
permission_id
permissions
id
Environment (please complete the following information, because it helps us investigate better):
The text was updated successfully, but these errors were encountered:
I can't replicate this. And the test suite, which runs a lot of migrations via fresh installs ... is passing.
What database engine are you using?
Sorry, something went wrong.
To me the problem is on seed
No branches or pull requests
Problem when trying to migrate laravel-permission migrations
Versions
PHP version: 8.3
Database version:
To Reproduce
Steps to reproduce the behavior:
Create new laravel project with v10.48.4
install laravel permission v6.4
publish packege file
php artisan vendor:publish --provider="Spatie\Permission\PermissionServiceProvider"
Here is my example code and/or tests showing the problem in my app:
Expected behavior
SQLSTATE[HY000]: General error: 1005 Can't create table
Laravel
.model_has_permissions
(errno: 121 "Duplicate key on write or update") (Connection: mysql, SQL: alter tablemodel_has_permissions
add constraintmodel_has_permissions_permission_id_foreign
foreign key (permission_id
) referencespermissions
(id
) on delete cascade)Environment (please complete the following information, because it helps us investigate better):
The text was updated successfully, but these errors were encountered: