从元数据表 “public”.”schema_version” 检索已应用迁移列表时出错。

huangapple go评论65阅读模式
英文:

Error while retrieving the list of applied migrations from metadata table "public"."schema_version"

问题

我使用psql重新安装了Postgre。
现在我在启动应用程序时遇到了问题。
我授予了角色和权限给这些角色。
添加了拥有数据库权限的用户。
但我仍然遇到了与主题标题中相似的问题。

从元数据表"public"."schema_version"检索已应用迁移列表时出错
导致原因:org.postgresql.util.PSQLException:错误:拒绝对表schema_version的权限

导致原因:org.flywaydb.core.api.FlywayException:从元数据表"public"."schema_version"检索已应用迁移列表时出错

附注:
整个应用程序在同一转储上运行正常。

英文:

I reinstalled Postgre with psql.
Now I have problems with application start.
I grant the roles and privileges to roles.
Added users with privileges to the database.
And I still have problem like in topic title.

Error while retrieving the list of applied migrations from metadata table "public"."schema_version"
Caused by: org.postgresql.util.PSQLException: ERROR: permission denied for table schema_version

Caused by: org.flywaydb.core.api.FlywayException: Error while retrieving the list of applied migrations from metadata table "public"."schema_version"

P.S.
Entire application was working on the same dump.

答案1

得分: 1

似乎用户在架构上缺少权限。尝试这样做:

grant all privileges on schema public to my_app_user;

其中 my_app_user 是应用程序中用于连接数据库的用户。

英文:

It seems that user is missing privileges on schema. Try this:

   grant all privileges on schema public to my_app_user;

Where my_app_user is the user used in application to connect to database.

huangapple
  • 本文由 发表于 2020年7月27日 19:20:46
  • 转载请务必保留本文链接:https://go.coder-hub.com/63114221.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定