Hello Django core developers.
Sorry if this is not the correct place to handle this.
I have a legacy database in PostgreSQL, which is still in production.
I want to migrate it to Django.
I tried to do the reverse engineering of the database to generate models classes
I set my settings like this:
DATABASES = {
# this read/write into "public" postgresql schema
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'neweposse',
'USER': 'neweposse_user',
'PASSWORD': 'neweposse_user',
'HOST': '127.0.0.1',
'PORT': '5432',
},
# legacy database
'eposse': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'eposse',
'USER': 'eposse_user',
'PASSWORD': 'eposse_user',
'HOST': '127.0.0.1',
'PORT': '5432',
}
}
in terminal:
(django1.7a5)sutransdev@sutransdev:~/webdocpy$ python manage.py inspectdb
...
from __future__ import unicode_literals
from django.db import models
(django1.7a5)sutransdev@sutransdev:~/webdocpy$ python manage.py inspectdb --database=eposse
...
from __future__ import unicode_literals
from django.db import models
inspectdb not identify the tables in the database and does not generate the model classes
The question is?
1) Am I doing something wrong. Currently there any way he could get Django to recognize a schema different from the "public" database schema?
2) This is really a bug, and I need to create a ticket for this?
3) or Django does not currently support different database schema, but this feature will be added when Marc Tamlyn add enhanced features to postgresql, as described here:
Thanks for the hard work to maintain this great framework
--
Fábio C. Barrionuevo da Luz
Acadêmico de Sistemas de Informação na Faculdade Católica do Tocantins - FACTO
Palmas - Tocantins - Brasil - América do Sul