虽然我运行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 artisan make:auth命令,之后我安装了voyager laravel管理面板,之后我运行了migrate命令。
我无法弄清楚表格的问题是什么。
答案 0 :(得分:0)
php artisan migrate:refresh
试试这个(如果不行,你需要用手直接清理数据库,只需删除表并尝试php artisan再次迁移好运