-
-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
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
SQLSTATE Error during migration #203
Comments
Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid. |
I believe this is a WSL issue as described here: #125 |
This issue has been automatically marked as stale because it has not had recent activity. This might be due to missing feedback from OP. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue is locked due to inactivity |
Is there an existing issue for this?
Current Behavior
Starting the container fails at Migration during roles.
2015_08_29_105422_add_roles_and_permissions ................... 1,943ms FAIL
2024-01-12 16:35:27 SQLSTATE[42000]: Syntax error or access violation: 1068 Multiple primary key defined (SQL: alter table
role_user
add primary key (user_id
,role_id
))2024-01-12 16:35:27
2024-01-12 16:35:27 at /app/www/vendor/laravel/framework/src/Illuminate/Database/Connection.php:760
2024-01-12 16:35:27 756▕ // If an exception occurs when attempting to run a query, we'll format the error
2024-01-12 16:35:27 757▕ // message to include the bindings with SQL, which will make this exception a
2024-01-12 16:35:27 758▕ // lot more helpful to the developer instead of just the database's errors.
2024-01-12 16:35:27 759▕ catch (Exception $e) {
2024-01-12 16:35:27 ➜ 760▕ throw new QueryException(
2024-01-12 16:35:27 761▕ $query, $this->prepareBindings($bindings), $e
2024-01-12 16:35:27 762▕ );
2024-01-12 16:35:27 763▕ }
2024-01-12 16:35:27 764▕ }
2024-01-12 16:35:27
2024-01-12 16:35:27 +9 vendor frames
2024-01-12 16:35:27 10 /app/www/database/migrations/2015_08_29_105422_add_roles_and_permissions.php:35
2024-01-12 16:35:27 Illuminate\Support\Facades\Facade::__callStatic()
Expected Behavior
Successful Migration and application startup.
Steps To Reproduce
Create a docker.compose.yml file
Run this command in the root of the file:
docker-compose up -d
Open docker to see the result.
Environment
CPU architecture
x86-64
Docker creation
The text was updated successfully, but these errors were encountered: