-
Notifications
You must be signed in to change notification settings - Fork 11
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
Duplicate Forign Key Constraint Name issue #5
Comments
hey, for edge cases like this you could use traditional migrations. can you post the code you're using in your it might be the way it creates a temp table which is causing the dupe. |
Yeah, i've done that, as a stop gap, just had to swap the order around in the vendor file, to run the traditional migrations after the automatic migrations (could potentially be a case for an extra flag on the migrate:auto command?). Sure thing, the code for the Courses table is:
and the Colleges table it is referencing:
Let me know if you need anything more! Many thanks. |
Hi, I have this issue, too. It's a problem similar to Issue #3 I noted two problems:
or
It works for me Bye, |
Thank you, Marco! Your code did the trick. I place the file, below, under Console > Commands and it automatically got picked up and worked! Will remove this file once a fix is added to the repo. I'm using the one under legodion/lucid, though. MigrateCommand.php
|
Heya, just started out a fresh project using your livewire-ui package, however i am encountering an issue with the automatic migrations. It doesnt seem to be handling a foreign key constraint properly when checking for differences in the table. I can migrate initially, however even with no changes, i run the migrate:auto command and it seems to try to re-add the foreignId as i get an error that the constraint already exists. Not sure if im just missing something obvious or if this is a bug!
Video of issue
Using Sail Docker dev environment using MySQL 8.0.
Cheers!
The text was updated successfully, but these errors were encountered: