Skip to content

Commit 5b63478

Browse files
committed
Update documentation for schemas
1 parent 89bca60 commit 5b63478

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -314,10 +314,16 @@ check the indexes on the table and delete any extra indexes and create any missi
314314
is done through the index name, so if you use custom names for your indexes, it might happen that it won't get updated
315315
on change of the content but not the name.
316316

317-
### Custom Schema
317+
### Schemas
318318

319-
You can define any table name you wish for your views. They can even live inside your own custom
320-
[PostgreSQL schema](http://www.postgresql.org/docs/current/static/ddl-schemas.html).
319+
By default, the views will get created in the schema of the database, this is usually `public`.
320+
The package supports the database defining the schema in the settings by using
321+
options (`"OPTIONS": {"options": "-c search_path=custom_schema"}`).
322+
323+
The package `django-tenants` is supported as well, if used.
324+
325+
It is possible to define the schema explicitly for a view, if different from the default schema of the database, like
326+
this:
321327

322328
```python
323329
from django_pgviews import view as pg

0 commit comments

Comments
 (0)