Skip to content

Commit

Permalink
Special-case the default deferrable value in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Alastair McGowan-Douglas committed Nov 3, 2015
1 parent 50c0834 commit 2ec331e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/Test/SQL/Translator.pm
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ my %ATTRIBUTES = (
constraint => {
name => '',
type => '',
deferrable => 1,
deferrable => 0,
expression => '',
is_valid => 1,
fields => [],
Expand Down Expand Up @@ -135,6 +135,11 @@ sub default_attribs {
$hashref->{ $attr } = $ATTRIBUTES{ $object_type }{ $attr }
}

# Special case
if ($object_type eq 'constraint' and $hashref->{type} eq FOREIGN_KEY) {
$hashref->{deferrable} = 1;
}

return $hashref;
}

Expand Down

0 comments on commit 2ec331e

Please sign in to comment.