laravel php artisan迁移命令迁移错误

cnh2zyt3  于 2023-01-14  发布在  PHP
关注(0)|答案(1)|浏览(144)

当我运行php artisan migrate时,它会显示以下错误:

[Illuminate\Database\QueryException]
  SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'translations' already exists (SQL: create table `translations` (`
  id` int unsigned not null auto_increment primary key, `table_name` varchar(191) not null, `column_name` varchar(191) not null, `f
  oreign_key` int unsigned not null, `locale` varchar(191) not null, `value` text not null, `created_at` timestamp null, `updated_a
  t` timestamp null) default character set utf8mb4 collate utf8mb4_unicode_ci)


  [Doctrine\DBAL\Driver\PDOException]
  SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'translations' already exists


  [PDOException]
  SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'translations' already exists

在此之前,我已经运行php工匠make:auth命令,之后,我安装了voyager laravel管理面板,之后,我运行迁移命令。
我不知道table有什么问题。

j2qf4p5b

j2qf4p5b1#

php artisan migrate:refresh

试试这个(如果不工作,你需要徒手清除数据库,只是删除表,并尝试php工匠迁移再次祝你好运

相关问题