Skip to content

Commit

Permalink
Add disable/enable constraints for postgres.
Browse files Browse the repository at this point in the history
Now that fixture constraints can be deferred, we can use the simple
version of disabling constraints.
  • Loading branch information
markstory committed Sep 4, 2014
1 parent 4fe2266 commit 30e0e8e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Database/Dialect/PostgresDialectTrait.php
Expand Up @@ -141,11 +141,13 @@ public function schemaDialect() {
* {@inheritDoc}
*/
public function disableForeignKeySQL() {
return 'SET CONSTRAINTS ALL DEFERRED';
}

/**
* {@inheritDoc}
*/
public function enableForeignKeySQL() {
return 'SET CONSTRAINTS ALL IMMEDIATE';
}
}

0 comments on commit 30e0e8e

Please sign in to comment.