Instructions (Documentation) on using non-default database
See original GitHub issueIs your feature request related to a problem? Please describe. I have a default database as the sqlite type and would like to use a PostgreSQL database specifically setup for django-helpdesk. I did not find instructions to accomplish this goal and was unsuccessful trying to solve on my own.
Describe the solution you’d like Add instructions into the docs on how to setup a non-default database and routers to properly configure django-helpdesk for this scenario.
Additional context I attempted to setup a router that would route any helpdesk traffic to my non-default database with label helpdesk (PostgreSQL database) and the closest I got was while trying to migrate received the following errors. My setup did not properly create tables, and so some instructions would be valuable to me and others.
python manage.py migrate helpdesk
Operations to perform:
Apply all migrations: helpdesk
Running migrations:
Applying helpdesk.0003_initial_data_import...Traceback (most recent call last):
File "virtualenv/lib/python3.6/site-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
psycopg2.errors.UndefinedTable: relation "helpdesk_emailtemplate" does not exist
LINE 1: UPDATE "helpdesk_emailtemplate" SET "template_name" = 'assig...
^
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (5 by maintainers)
Top GitHub Comments
And for posterity, I made a suggestion to the Dango Project to improve the documentation: https://code.djangoproject.com/ticket/32083#ticket
I did more research and had a couple of problems, none of which are helpdesk and all were Django. The main problem, even when I had all the routers setup properly, was that Django requires a migrate command to be run for each database with the database specified on the command line, the Django documentation does not tell you this in the section that explains Multiple Databases.