It upcases default_timestamp in default values, so make sure they are
downcased again for consistency with other loaders.
Revision history for Perl extension DBIx::Class::Schema::Loader
- Fix for PostgreSQL enums not in the schema search path (RT#123234)
+ - Fix 'default now()' test for PostgreSQL v10
0.07047 2017-05-26
- Avoid upcoming DBIC warning on implicit SELECT * invocation
my $now = 'now()';
$info->{original}{default_value} = \$now;
}
+ elsif (${ $info->{default_value} } =~ /\bCURRENT_TIMESTAMP\b/) {
+ # PostgreSQL v10 upcases current_timestamp in default values
+ ${ $info->{default_value} } =~ s/\b(CURRENT_TIMESTAMP)\b/lc $1/ge;
+ }
}
# detect 0/1 for booleans and rewrite