tobytwigger / laravel-job-status

The only Laravel job debugging tool you'll ever need
https://tobytwigger.github.io/laravel-job-status
MIT License
19 stars 1 forks source link

Rollback migrations fail #49

Closed mortenscheel closed 1 year ago

mortenscheel commented 1 year ago

Rolling back the migrations fail with the following error

SQLSTATE[HY000]: General error: 1828 Cannot drop column 'batch_id': needed in a foreign key constraint 'job_status_job_statuses_batch_id_foreign' (SQL: alter table `job_status_job_statuses` drop `batch_id`)

So either ignore foreign key checks during rollback, or drop the tables in the right order.

It happens while rolling back the second migration file: image

tobytwigger commented 1 year ago

Thanks a lot for your feedback and pointing out this bug - I've fixed it in #57 and will do a release this evening :)