SQL 在机器之间移动项目时 Laravel 中的错误

SQL error in Laravel when moving project between machines

我刚刚将 laravel 项目从一台机器转移到另一台机器。 我所做的是: - 创建一个新的 Laravel Homestead 机器。 -从我的 laravel 应用文件夹

复制所有文件

网站在我的新机器上运行正常,但任何依赖于数据库的操作都会失败,因为表不是在我的新服务器上创建的。错误如下:

QueryException in Connection.php line 673: SQLSTATE[42S02]: Base table or view not found:

迁移存在于我的新机器中,但我无法执行

php artisan migrate

php artisan migrate:refresh

因为两者 return

[Symfony\Component\Debug\Exception\FatalErrorException]
Cannot declare class CreateUsersTable, because the name is already in use

我在这里呆了这么多时间,我不知道该做什么。

从数据库中手动删除所有 table,包括迁移 table 和 运行 php artisan migrate