projects
/
dbsrgits/DBIx-Class-Schema-Loader.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
add ->{original}{default_value} when rewriting to current_timestamp
[dbsrgits/DBIx-Class-Schema-Loader.git]
/
lib
/
DBIx
/
Class
/
Schema
/
Loader
/
DBI
/
Pg.pm
diff --git
a/lib/DBIx/Class/Schema/Loader/DBI/Pg.pm
b/lib/DBIx/Class/Schema/Loader/DBI/Pg.pm
index
52c7489
..
e92fbaf
100644
(file)
--- a/
lib/DBIx/Class/Schema/Loader/DBI/Pg.pm
+++ b/
lib/DBIx/Class/Schema/Loader/DBI/Pg.pm
@@
-231,6
+231,9
@@
EOF
if ((eval { lc ${ $info->{default_value} } }||'') eq 'now()') {
# do not use a ref to a constant, that breaks Data::Dump output
${$info->{default_value}} = 'current_timestamp';
+
+ my $now = 'now()';
+ $info->{original}{default_value} = \$now;
}
}