1

当我运行 php artisan 迁移时。它将显示以下错误:

[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 artisan make:auth 命令,之后我安装了 voyager laravel 管理面板,之后我运行了 migrate 命令。

我无法弄清楚桌子有什么问题。

4

1 回答 1

0
php artisan migrate:refresh 

试试这个(如果不起作用,你需要徒手清除数据库,只需删除表并再次尝试 php artisan migrate 祝你好运

于 2017-04-29T19:48:30.413 回答