#27708: Relation between tables in different schemas with big names
-------------------------------------+-------------------------------------
Reporter: felipeps | Owner: nobody
Type: Bug | Status: new
Component: Migrations | Version: 1.9
Severity: Normal | Resolution:
Keywords: different schema | Triage Stage:
relation | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Description changed by felipeps:
Old description:
> I'm using Django 1.9.7 with Postgresql.
>
> When I try to migrate a relation between two tables in different
> schemas, for example: a table named ''**product**'', which is in a schema
> named ''**dataflex**'' and another table named
> ''**client_product_sale_stc**'' in another schema.
>
> 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 size and It worked just like when
> I decreased schema's name size, so It seems to be a problem with big
> constraints names.
>
> I'm using the following syntax:
>
> db_table = '"dataflex"."product"'
>
> **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.
New description:
I'm using Django 1.9.7 with Postgresql.
When I try to migrate a relation between two tables in different schemas,
for example: a table named ''**product**'', which is in a schema named
''**dataflex**'' and another table named ''**client_product_sale_stc**''
in another schema.
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 size and It worked just like when I
decreased schema's name size, so It seems to be a problem with big
constraints names.
I'm using the following syntax:
db_table = '"dataflex"."product"'
**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.
--
--
Ticket URL: <https://code.djangoproject.com/ticket/27708#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/066.f7170cc5ffd33582b77b7fa4bbf8e6d1%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.