Django can create tables without migrations if an app is left 'unmigrated' (doesn't have a migrations package in the app) and the run_syncdb option is provided to the migrate command. By default tests are run with run_syncdb=True so unmigrated apps are created in the database. Django's tests use this feature extensively as it simplifies the testing workflow (changes to test models are immediately reflected in the test db without having to run makemigrations).
I would like to enhance django-pgtrigger so that triggers are created for unmigrated apps when run_syncdb=True
Here's the part of django's migrate command that creates the tables of unmigrated apps when run_syncdb option is set:
https://github.com/django/django/blob/1a7b6909ac030d2c4dae2664b08ee0bce9c4c915/django/core/management/commands/migrate.py#L321
Django can create tables without migrations if an app is left 'unmigrated' (doesn't have a migrations package in the app) and the
run_syncdboption is provided to themigratecommand. By default tests are run withrun_syncdb=Trueso unmigrated apps are created in the database. Django's tests use this feature extensively as it simplifies the testing workflow (changes to test models are immediately reflected in the test db without having to runmakemigrations).I would like to enhance django-pgtrigger so that triggers are created for unmigrated apps when
run_syncdb=TrueHere's the part of django's
migratecommand that creates the tables of unmigrated apps whenrun_syncdboption is set:https://github.com/django/django/blob/1a7b6909ac030d2c4dae2664b08ee0bce9c4c915/django/core/management/commands/migrate.py#L321