I'm working with Django 1.9.7 with Postgresql and I stuck in a problem with 
relations between tables in different schemas.

The problem that I'm facing is that I have a table, for example, named 
*product, 
*which is in a schema named *dataflex *and another table named 
*client_product_sale_stc 
*in another schema.
When I try to migrate a relation between *client_product_sale_stc *and 
*product, 
*I got this error:

django.db.utils.ProgrammingError: ERRO:  syntax error at or near "dataflex"
LINE 1: ...CONSTRAINT "client_product_setor_id_52aad07a_fk_"dataflex"....


After sometime trying to figure It out a solution for this problem, I tried 
to change the schemas's name to just df instead of dataflex and It worked 
perfectly.

I also tried to decreased table's name, and It worked just like when I 
decreased schema's name size, so this It seems to be a problem with big 
constraints names.


I'm using the follow syntax:

*db_table = '"dataflex"."product"'*


Is this same problem with djando and postgresql big names on relation 
between diffent schemas?

Is there any other way to fix It? 


OBS:*setor_id is the name of the field of the relation 
in client_product_sale_stx model/table. *

* product model/table does not have a field for the relation.*




-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/8164564e-8d25-49e0-93fa-4c75befbf4fb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to