Previously a fix was committed to support DEFAULT NULL in Pg, this
broke the SQLAnywhere ODBC driver tests, because ::DBI::SQLAnywhere had
a fixup for default_value => \"NULL", and it is now lowercased.
Only the ODBC driver sets nullable columns DEFAULT NULL, so this fixup
has been moved to ::DBI::ODBC::SQL_Anywhere, with the correct case.
All SQL Anywhere tests pass again.
See L<DBIx::Class::Schema::Loader::Base> for usage information.
+=cut
+
+sub _columns_info_for {
+ my $self = shift;
+
+ my $result = $self->next::method(@_);
+
+ while (my ($col, $info) = each %$result) {
+ # The ODBC driver sets the default value to NULL even when it was not specified.
+ if (ref $info->{default_value} && ${ $info->{default_value} } eq 'null') {
+ delete $info->{default_value};
+ }
+ }
+
+ return $result;
+}
+
=head1 SEE ALSO
L<DBIx::Class::Schema::Loader::DBI::SQLAnywhere>,
=cut
1;
+# vim:et sw=4 sts=4 tw=0:
$info->{data_type} = 'real';
}
- delete $info->{default_value} if ref($info->{default_value}) eq 'SCALAR' && ${ $info->{default_value} } eq 'NULL';
-
if ((eval { lc ${ $info->{default_value} } }||'') eq 'current timestamp') {
${ $info->{default_value} } = 'current_timestamp';