Pass data about the internal DB connection to the front end via common_data #3292
Labels
ready
Ready for implementation
restricted: maintainers
Only maintainers can resolve this issue
type: enhancement
New feature or request
work: backend
Related to Python, Django, and simple SQL
Milestone
Mathesar stores its metadata within a Django "internal database". The connection to this database is defined via environment variables, and it can either be a PostgreSQL connection or a file path to a SQLite database.
In the "New DB Connection" form, the front end needs to know some details about this internal database connection in order to render the form.
The backend should put this
internal_database
field into the "common_data" bundle injected into the front end. As such, we should not need any API modifications to pass this data to the front end.When using SQLite, the backend should pass this data to the front end:
When using Postgres, the backend should pass data like this:
When "type" is "postgres", all remaining properties as exemplified above must be present and must be strings (i.e. not
null
).The text was updated successfully, but these errors were encountered: