I added two new tables, but PHP artisan migrate said the user table already exists, this is the last time I built the table, but the second execution of PHP artisan migrate error.
May I ask how this is solved?
Reply content:
I added two new tables, but PHP artisan migrate said the user table already exists, this is the last time I built the table, but the second execution of PHP artisan migrate error.
May I ask how this is solved?
I've been in this situation lately, and that's what I did.
mysqldump -uroot -p database > database.sql
Then go to the database, delete the library, and recreate it.
Then source
mysql > source ~/database.sql
That's what I did.
may not be elegant enough, but there is no problem.
I hope it helps.
You can execute the rollback command. If you have a write down () function
php artisan migrate:rollback
Delete the table in the database.