hasura / hasura/graphql-engine
Database structure changes don't trigger inconsistent metadata
- Dominant language
- TypeScript
- Stars
- 32.1k
- Forks
- 3k
- PR merge metrics
- PR metrics pending
Description
### Version Information
Server Version: 2.2.0
### Environment
OSS
### What is the expected behaviour?
When database sources have new columns in a tracked table, I should be notified that the metadata is inconsistent
### Keywords
inconsistent metadata, database source, DDL, structure
### What is the current behaviour?
### How to reproduce the issue?
1. Add a DB as a source
2. Track a table
3. with pgadmin/psql/hasura migrations (NOT hasura console, basically), add a column to said tracked table
4. frontend will throw an error whenever browsing this table in the data panel
5. metadata is considered consistent regardless
### Screenshots or Screencast
For example, I added a `test_column` to a tracked table, and the console is upset.


`get_inconsistent_metadata` is quite happy nonetheless.

### Any possible solutions?
Despite metadata not showing as inconsistent, a reload (with database sources enabled) will fix the problem.
Contributor guide
Research direction
Start with the get_inconsistent_metadata behavior and reproduce the issue by adding a column to a tracked PostgreSQL table through pgadmin, psql, or migrations rather than the Hasura console. Trace how a reload detects the changed structure, then verify that metadata is reported as inconsistent and the data panel no longer throws an error without requiring a reload.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- postgresql
- Domain
- backend-api-design, databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 40/100