Migrate command does not respect options for db connections?

20 views
Skip to first unread message

George Silva

unread,
May 30, 2015, 3:29:48 PM5/30/15
to django-users
Context:

Django 1.7.1
PostgreSQL 9.4

I have the following database entry in settings:

DATABASES = {
'default': {
'ENGINE': 'django.contrib.gis.db.backends.postgis',
'NAME': 'xpto',
'USER': 'postgres',
'PASSWORD': 'postgres',
'HOST': 'localhost',
'PORT': '5432',
'OPTIONS': {
'options': '-c search_path=xpto,public'
}
}
}

And the following model:

class ModelA(models.Model):
    att_a = models.CharField(max_length=10)

I' just created a migration with makemigrations for this app. It does not have any indication of schema, whatsoever.

When I ran the migration, with migrate, the table ended up on the public schema.

Bug?

--
George R. C. Silva
Sigma Geosistemas LTDA
----------------------------

George Silva

unread,
Jun 2, 2015, 10:18:15 AM6/2/15
to django-users
Any news? Hello?
Reply all
Reply to author
Forward
0 new messages