no such column exists for PostgreSQL db in Hasura (Graphql) console when adding column via DBeaver
Asked Answered
M

3

7

I just tested modifying a table in my PostgreSQL db through DBeaver and it seems to have broken the db when looking at the data from the Hasura (Graphql) console. I simply added a column from Dbeaver. In Hasura I get an error "no such column exists". Anyone have any idea why or how I can fix this?

Misrule answered 10/1, 2021 at 1:36 Comment(2)
Could you show us your SQL statements that altered that table? And why do you think you broke the database? Are there any error messages in your PostgreSQL server log? And Yes, it looks like Hasura is looking for a column that doesn't exist (anymore). You could create that column, if you know what column it is.Firry
Thanks @FrankHeikens. It was a conflict in the meta data in the console.Misrule
M
11

Hasura support helped me pinpoint it to the metadata stored in the Graphql console. Hope this helps someone else save a little time.

"If you make DDL changes to your database from outside Hasura, you must manually reload the Hasura metadata so that Hasura knows that something has changed and it adapts to those changes accordingly.You can reload the metadata by clicking on the settings icon on the top right in console."

Misrule answered 11/1, 2021 at 0:32 Comment(2)
And don't forget to add permission for new colunns for roles other than "admin"Cumquat
I had to check "Reload all databases" as wellBackhouse
A
2

you have to update the metadata, from the console it would be:

hasura metadata reload
Acknowledgment answered 17/11, 2022 at 17:0 Comment(0)
A
1

You need to reload the metadata so Hasura knows that new data has been added. Click the gear icon > Reload metadata > Reload

enter image description here

Abstention answered 12/10, 2023 at 2:56 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.