【问题标题】:Deleting migrations results in an Exception删除迁移会导致异常
【发布时间】:2015-09-06 22:53:42
【问题描述】:

在我的应用程序中,当我运行php artisan migrate:make create_location_user_table,然后删除生成的文件(如果我删除在vendor/composer/autoload_classmap.php 中创建的行无关紧要,php artisan migrate:refresh 命令会抛出错误:

include(<path_to_project>/database/migrations/2015_06_21_105357_create_location_user_table.php): failed to open stream: No such file or directory

运行命令以消除错误的自动加载条目后,我得到一个异常。我试过的命令是:composer updatecomposer dump-autoloadphp artisan clear-compiledphp artisan optimize

PHP Fatal error:  Class 'CreateLocationUserTable' not found in <path_to_project>\vendor\laravel\framework\src\Illuminate\Database\Migrations\Migrator.php on line 323

[Symfony\Component\Debug\Exception\FatalErrorException]
Class 'CreateLocationUserTable' not found

【问题讨论】:

    标签: php laravel laravel-5 composer-php autoload


    【解决方案1】:

    手动进入您的 mysql 数据库 (PHPMyAdmin) 并删除迁移表。通过您在上面采取的步骤,这样做应该可以解决您的问题

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-09-13
      • 2010-11-17
      • 1970-01-01
      • 1970-01-01
      • 2023-03-22
      • 1970-01-01
      • 1970-01-01
      • 2011-08-10
      相关资源
      最近更新 更多