My user table migration is out of sync. When I try and rollback all tables everything is rolled back (excluding User because it doesnt exsist), when I migrate, the user table does not migrate. migrate:refresh gives me the following error:
SQLSTATE[HY000]: General error: 1 no such table: users (SQL: drop table "users")
So I believe I need to drop my database and recreate it. How do I do this?
I wonder why that happened. Did you rename your user migration file perhaps?
If data isn't a concern, the easiest thing to do would be to manually delete all tables including the 'migrations' table and re-run php artisan migrate
You won't be able to use Laravel migrations to do this. You'll have to use the command line, phpmyadmin or Sequel Pro to drop all tables.
@Mfrancik. No don't delete the migration files. Your migration files are what Laravel uses to perform actions on your database. They aren't the actual tables so deleting them will not help you in this case.
When I say delete the tables, I am referring to deleting the tables in your actual database. So if you are using Sequel Pro to work with your database, login there and drop all of the tables in your database or use the mysql command line. What you are trying to do is start with an empty database so artisan migrate can rebuild its migrations table and all of the tables you've defined in your migrations.
@Mfrancik. No problem. Glad you got it sorted out.
One additional note. If you deleted the physical migration file, you will also want to delete the corresponding record in your migrations table in your actual database or future attempts to refresh your migration may fail.