Laravel Migration to Neon Error
When I try to migrate my laravel database to Neon's server, I keep getting this error:
for context:
I have 2 tables; countries and provinces, to which provinces references countries via country_id like so:
The commented code are the attempts at restructuring the foreignId in hopes that it would work. But the thing is, there are other files in my migrations that have foreignId's set like the ones above and they're working fine, here's an example:
All that I'm doing for this error to appear is using the command in my terminal, or migrating the specific file individually.
yes, the countries migration is running before the provinces.
Any answer is appreciated!
2 Replies
deep-jade•3mo ago
That's very interesting. Was there no other error message available?
sensitive-blueOP•3mo ago
that's all I got from the terminal, here's the whole error message:
Update: I fixed the issue by including the on all of my migration files