[Laravel]:SQLSTATE [3F000]:无效的架构名称 [英] [Laravel]: SQLSTATE[3F000]: Invalid schema name

查看:570
本文介绍了[Laravel]:SQLSTATE [3F000]:无效的架构名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

构建Laravel项目(v。5.4版)时,运行 php artisan migration 时,我收到以下错误消息:

Building a Laravel project (v. 5.4) When I run php artisan migrate I get the following error message:

[Illuminate\Database\QueryException]
SQLSTATE[3F000]: Invalid schema name: 7 ERROR: no schema has been selected
to create in (SQL: create table "migrations" ("id" serial primary key not
null, "migration" varchar(255) not null, "batch" integer not null))

这只是现在才开始发生,而我之前已经在这个项目中创建了一个模型并伴随着迁移而没有发生任何事情,并且没有更改我的.env文件或自初始设置起生效的config / database.php文件。我认为这可能与错误的Postgresql用户有关,但我登录了CLI,并到了相关数据库的所有者。没效果。

This just started happening now, whereas I've previously made a model and accompanying migration without incident in this very project, and have not changed my .env file or the config/database.php file since the initial setup that worked. I thought it might have something to do with being the wrong postgresql user, but I logged in to the CLI and SET ROLE to the owner of the database in question. No effect.

推荐答案

如果您的架构名称不是 public,只需将其重命名为 public

if your schema name is not "public" just rename it "public"

这篇关于[Laravel]:SQLSTATE [3F000]:无效的架构名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆