Are Django models "db_tablespace" equivalent to Postgres Schemas?
I just stumbled with the Django docs reference to db_tablespace
option in Meta()
, and I'm unsure: Are "tablespaces" (as defined in Django) somewhat equivalent to "schemas" (as defined and used in Postgres)?
For example: Would the following models:
from django.db import models
class Person(models.Model):
name = models.CharField(max_length=100)
age = models.IntegerField()
class Meta():
db_table = 'person'
db_tablespace = 'people'
class Book(models.Model):
author = models.ForeignKey(Person)
title = models.CharField(max_length=100)
class Meta():
db_table = 'book'
db_tablespace = 'books'
... be mapped to Postgres schemas / tables people.person
and books.book
?