Remember once lumen delete the file migration step on pit

Created by artisan named: After migration to migrate files create_Consignees found the wrong case, obsessive-compulsive disorder can not endure, then. Directly in the database / migration migration folder directly to the deleted file you just created, and then create.


vagrant@homestead:~/Code/lumen/blog$ php artisan make:migration Create_Consignees --create=Consignees

  [ErrorException]
  include(/home/vagrant/Code/lumen/blog/vendor/composer/../../database/migrat
  ions/2018_05_17_162403_create_Consignees.php): failed to open stream: No su

  ch file or directory


Not able to find that the file just wrong, but obviously the deleted file. Of course, to be found. Then think of because it is manually deleted, composer did not do processing, see tips should also be compose traverse file error in the process created, with the composer at the directory to find

Then in both files

lumen\blog\vendor\composer\autoload_static.php

lumen\blog\vendor\composer\autoload_classmap.php

Medium manner

return array(
Returns an array, locate the residual information just deleted the file,

'CreateConsignees' => $baseDir . '/database/migrations/2018_05_17_162403_create_Consignees.php',

Deleted.

再执行命令:vagrant@homestead:~/Code/lumen/blog$ php artisan make:migration Create_Consignees --create=Consignees

Create, create success tips:

Created Migration: 2018_05_17_163018_Create_Consignees


Judging: composer at the time this information is generated in accordance with the class name Create + to generate the database table name, class name can not be repeated. Create a table with the same name data migration, did not completely remove it wrong.



Attach the correct operating position:

https://blog.csdn.net/chajinglong/article/details/71192066

Published 18 original articles · won praise 8 · views 30000 +

Guess you like

Origin blog.csdn.net/qq_20408397/article/details/80352939