When migrating my DB, this error appears. Below is my code followed by the error that I am getting when trying to run the migration.
Code
@JuanBonnett’s question has inspired me to find the answer. I used Laravel to automate the process without considering the creation time of the file itself. According to the workflow, “meals” will be created before the other table (categories) because I created its schema file (meals) before categories. That was my fault.