schema => $remote_schema,
) unless exists $rels{$fk}{remote_table};
- $rels{$fk}{attrs}{on_delete} = uc $delete_rule;
- $rels{$fk}{attrs}{on_update} = uc $update_rule;
- $rels{$fk}{attrs}{is_deferrable} = uc $is_deferrable eq 'YES' ? 1 : 0;
+ $rels{$fk}{attrs} ||= {
+ on_delete => uc $delete_rule,
+ on_update => uc $update_rule,
+ is_deferrable => uc $is_deferrable eq 'YES' ? 1 : 0,
+ };
}
return [ values %rels ];
id bigserial primary key,
eleven_id int,
foreign key (eleven_id) references pg_loader_test9(id)
- on delete restrict on update set null
+ on delete restrict on update set null deferrable
)
},
is $rel_info->{attrs}{on_update}, 'SET NULL',
'ON UPDATE clause introspected correctly';
- is $rel_info->{attrs}{is_deferrable}, 0,
+ is $rel_info->{attrs}{is_deferrable}, 1,
'DEFERRABLE clause introspected correctly';
foreach my $db_schema (['dbicsl-test', 'dbicsl.test'], '%') {