EF6 + Postgres关系dbo.AspNetUsers不存在 [英] EF6 + Postgres relation dbo.AspNetUsers does not exist

查看:152
本文介绍了EF6 + Postgres关系dbo.AspNetUsers不存在的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在关注PostgreSQL与EF6一起使用的帖子 http://www.jasoncavett.com/blog/postgresql-and-entity-framework-6-code-first/

I have been following this post on using PostgreSQL with EF6 http://www.jasoncavett.com/blog/postgresql-and-entity-framework-6-code-first/.

我已经启动了一个全新的MVC5项目,希望在我的后端应用程序中使用Postgres。应用程序启动正常,但是当您去注册用户时(我选择了个人身份验证),我收到以下错误消息

I have started a brand new MVC5 project hoping to use Postgres in my application for backend. The application starts up fine however when you go to register a user (I selected individual authentication) I get the following error messsage


错误:42P01 :关系 public.AspNetUsers不存在

ERROR: 42P01: relation "public.AspNetUsers" does not exist

我不确定如何解决此问题。

I am unsure as to how to resolve this problem.

错误发生在第155行,可以在此处

The error happens on line 155 which can be seen here

可以根据需要提供更多信息。

More information can be provided if needed.

推荐答案

我在迁移之前已经运行了应用程序到Postgres,所以我要做的就是通过软件包管理器控制台添加迁移并更新数据库。

I had ran the application before migrating to Postgres so all I needed to was to add a migration and update database through the package manager console.

这篇关于EF6 + Postgres关系dbo.AspNetUsers不存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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