python - Using schemas in Django -
i using django 1.8..
i have been trying make migrations of specific app of models have prefixes describing schema belong to. here example:
class networkfeature(models.model): id_network_feature = models.autofield(primary_key=true) class meta: db_table = u'"schema1"."network_feature"' class complexelement(networkfeature): complex_element_class = models.foreignkey(complexelementclass, blank=true, null=true) class meta: db_table = u'"schema1"."complex_element"' i have played around 'schema"."table' 'schema\".\"table' , possible combinations , nothing seems solve problem, when makemigrations <my-app> works fine when run migrate <my-app>, it's been showing up..
django.db.utils.programmingerror: zero-length delimited identifier @ or near """" line 1: create index ""schema1"."network_feature"_2b331646" on "schema1"."ne...
or
django.db.utils.programmingerror: syntax error @ or near "." line 1: create index "schema1"."complex_element_58db0be5" on ...
if try change settings.py's search-path, doesn't find foreign keys..
there other threads talking it, none of them have replicable answer and/or aren't 1.8 lts. appears me there isn't way perform out of box..
Comments
Post a Comment