I believe it's a bug that's fixed in Django 1.9:
https://github.com/django/django/commit/f37c11eea3cb860112a26f8a65d823842f65b96f

On Monday, September 28, 2015 at 11:12:26 PM UTC-4, Григорий Крамаренко 
wrote:
>
> In migrations I need delete constraints before creating table-partitioning.
> But Django generates different constraint names on different servers.
> On server 1:
> ALTER TABLE "order_autoselect" ADD CONSTRAINT 
> "order_autoselec_summary_id_1d623f742c26ae09_fk_order_summary_id" FOREIGN 
> KEY ("summary_id") REFERENCES "order_summary" ("id") DEFERRABLE INITIALLY 
> DEFERRED;
>
> On server 2:
> ALTER TABLE "order_autoselect" ADD CONSTRAINT 
> "order_autoselect_summary_id_2c26ae09_fk_order_summary_id" FOREIGN KEY 
> ("summary_id") REFERENCES "order_summary" ("id") DEFERRABLE INITIALLY 
> DEFERRED;
>
>
> Version 1.8.4 uses on all servers.
>
> The application is written for multiple installations in different 
> organizations and on different servers.
> Before, in version 1.4, the constraints were created without hashes and 
> were really unique. And we could write one SQL script which will be 
> executed after the command "syncdb" and will 100% work everywhere. Attempt 
> to migrate the app to a new Django version 1.8 turned into such problems.
>
> How make it? Or is it a bug in Django? Thanks.
>
>

-- 
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/ddfb8c63-0ba8-4262-874e-c9bc5edd009b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
  • Drop constrailts Григорий Крамаренко
    • Re: Drop constrailts Tim Graham

Reply via email to