Disable PostgreSQL foreign key checks for migrations
<p>I'm creating a lot of migrations that have foreign keys in PostgreSQL 9.4.</p>

<p>This is creating a headache because the tables must all be in the exact order expected by the foreign keys when they are migrated. It gets even stickier if I have to run migrations from other packages that my new migrations depend on for a foreign key.</p>

<p>In MySQL, I can simplify this by simply adding <code>SET FOREIGN_KEY_CHECKS = 0;</code> to the top of my migration file. How can I do this temporarily in PostgresSQL only for the length of the migration code?</p>

<p>BTW, using the Laravel Schema Builder for this.</p>