saxix/django-concurrency — pull request #41 by Naddiseo (2014-10-07 20:51:52+00:00)
Title: Trigger compatibility with django 1.7 migrations

The Problem:

Say you have some migrations:

0001 -> Creates Model A
0002 -> Creates Model B

If this is run, the trigger creation code for Model B will be fired upon the creation signal sent for Model A, and at that point the table for Model B hasn't been created.

My (incomplete) Solution:
In this situation I expect that the triggers should only be created for the app which was migrated, and only those models created thus far. This patch only creates the triggers for the app which the sender belongs to. Unfortunately, I think there will still be a problem if Model A and B are in the same App, but I haven't tested this case.