【发布时间】:2018-10-30 04:10:52
【问题描述】:
$ php artisan migrate
In Connection.php line 647:
SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'users' alre
ady exists (SQL: create table `users` (`id` int unsigned not null auto_incr
ement primary key, `name` varchar(191) not null, `email` varchar(191) not n
ull, `password` varchar(191) not null, `remember_token` varchar(100) null,
`created_at` timestamp null, `updated_at` timestamp null) default character
set utf8mb4 collate utf8mb4_unicode_ci)
In Connection.php line 449:
SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'users' alre
ady exists
我正在尝试在 users 表中添加更多列,但我不能。在终端我写命令 php artisan migrate 但基表或视图已经存在:1050 表'用户'已经存在。我现在能做什么?
【问题讨论】:
-
不要使用
Schema::create使用Schema::table添加更多列
标签: php mysql laravel artisan-migrate