I'm using PostgreSQL 9.3 and Django 1.7.4 with psycopg2 2.5.4
The DBA, asked us to create a schema for our application instead of using public.
We defined the schema, and we had to add the
'OPTIONS': {
'options': '-c search_path=custom-schema-name'
},
to the settings.
During testing, Django is creating the test database with the corresponding name, but we can't set the custom-schema name
I tried to find a way to set up the custom schema name (I've read the docs) but I can't find a way to force the creation of the schema name during testing.
The error that I obtain is
django.db.utils.ProgrammingError: no schema has been selected to create in
When I see the created database , it has the schema public created by default.
I partially solved this issue and added to the search path the schema name public
'OPTIONS': {
'options': '-c search_path=custom-schema-name,public'
},
but I'd like to create the test database with a custom schema name.
Does anybody knows how to set the testing schema name ?