Home > Backend Development > PHP Tutorial > Laravel 5.2 Zizaco/entrust 无法生存数据库

Laravel 5.2 Zizaco/entrust 无法生存数据库

WBOY
Release: 2016-06-06 20:09:22
Original
1242 people have browsed it

Laravel Framework version 5.2.31 按照Github上的说明,一步步配置的,到执行php artisan migrate 时会报错:

<code>[Illuminate\Database\QueryException]                                         
  SQLSTATE[42000]: Syntax error or access violation: 1103 Incorrect table nam  
  e '' (SQL: alter table `role_user` add constraint `role_user_user_id_foreig  
  n` foreign key (`user_id`) references `` (`id`) on delete cascade on update  
   cascade)
   
   
   [PDOException]                                                               
  SQLSTATE[42000]: Syntax error or access violation: 1103 Incorrect table nam  
  e ''
  
  </code>
Copy after login
Copy after login

查看数据库中的表,只创建了roles和role_user两个表!

回复内容:

Laravel Framework version 5.2.31 按照Github上的说明,一步步配置的,到执行php artisan migrate 时会报错:

<code>[Illuminate\Database\QueryException]                                         
  SQLSTATE[42000]: Syntax error or access violation: 1103 Incorrect table nam  
  e '' (SQL: alter table `role_user` add constraint `role_user_user_id_foreig  
  n` foreign key (`user_id`) references `` (`id`) on delete cascade on update  
   cascade)
   
   
   [PDOException]                                                               
  SQLSTATE[42000]: Syntax error or access violation: 1103 Incorrect table nam  
  e ''
  
  </code>
Copy after login
Copy after login

查看数据库中的表,只创建了roles和role_user两个表!

看这里

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template