英文:
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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论