Wave/Laravel Migration Hell :(
I'm in Laravel migrations hell. I ran: php artisan migrate:reset and now I'm getting: INFO Rolling back migrations
2014_10_12_000000_create_users_table ........................................................................ 4ms FAIL
Illuminate\Database\QueryException
SQLSTATE[HY000]: General error: 3730 Cannot drop table 'users' referenced by a foreign key constraint 'airtable_details_user_id_foreign' on table 'airtable_details'. (SQL: drop table if exists users)
at vendor/laravel/framework/src/Illuminate/Database/Connection.php:760 756▕ // If an exception occurs when attempting to run a query, we'll format the error 757▕ // message to include the bindings with SQL, which will make this exception a 758▕ // lot more helpful to the developer instead of just the database's errors. 759▕ catch (Exception $e) { ➜ 760▕ throw new QueryException( 761▕ $query, $this->prepareBindings($bindings), $e 762▕ ); 763▕ } 764▕ }
+12 vendor frames
13 wave/database/migrations/2014_10_12_000000_create_users_table.php:34 Illuminate\Support\Facades\Facade::__callStatic("dropIfExists")
+26 vendor frames
40 artisan:35 Illuminate\Foundation\Console\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
Hey!
The php artisan migrate:reset
command should only be executed on your local dev environment as it essentially drops all tables and recreates your database schema.
The error that you are getting is saying that you've had other changes made to that database not done via a migration causing the problem. This is not really a bug in Wave.
To fix this, what you could do is just drop your database and recreate it. That way you will start from scratch run your migrations as usual.
Let me know how it goes!
Best,
Bobby