当通过命令行:php artisan migrate:make create_authors_table --table=authors --create时,在 migration.php 中若Schema::table()而不是Schema::create时,会出现 table 不存在的指示,这时需要将 Schema::table 改为 Schema::create 。

有时输入:php artisan migrate 会显示其他表已存在导致无法创建新的表,这时可以将旧的 migration.php 中的 up 函数中的 Schema::create 改为 Schema::table 即可。

相关文章:

  • 2021-04-23
  • 2022-12-23
  • 2021-06-18
  • 2022-01-06
  • 2022-12-23
  • 2021-05-09
  • 2021-12-13
  • 2021-06-10
猜你喜欢
  • 2022-12-23
  • 2021-06-29
  • 2021-11-19
  • 2022-02-28
  • 2022-12-23
  • 2022-12-23
  • 2021-09-19
相关资源
相似解决方案