I\'m creating a lot of migrations that have foreign keys in PostgreSQL 9.4.
This is creating a headache because the tables must all be in the exact order expected by
For migration, it is easier to disable all triggers with:
SET session_replication_role = 'replica';
And after migration reenable all with
SET session_replication_role = 'origin';