[英]php artisan migrate command migrate error
当我运行 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 命令。
我不知道表格有什么问题。
php artisan migrate:refresh
试试这个(如果不工作你需要用手直接清除数据库只需删除表并尝试php artisan再次迁移好运
是的我同意。 这是可以做到的。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.