我可以创建迁移。它工作正常,但是当我执行 php artisan migrate 时,它说
[Illuminate\Database\QueryException]
SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'users' already exists (SQL: create table
users
(id
int unsigned not null auto_increment primary key,name
varchar(255) not null,password
varchar(255) not null,remember_token
varchar(100) null,created_at
timestamp null,updated_at
timestamp null) default character set utf8 collate utf8_unicode_ci)[PDOException]
SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'users' already exists
我检查了我的database.php
文件,它工作正常,并且已经将默认用户表迁移到我的 php 我的管理 mysql 中。
最佳答案
删除软件(phpmyadmin)中的所有表,然后再次迁移,这将迁移新创建的表,这不是一个正确的解决方案,但这在学习级别上有效,问候
关于php - Laravel 5.4 迁移错误 [42501],我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42634158/