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
/
MSSQL.pm
diff --git
a/lib/DBIx/Class/Schema/Loader/DBI/MSSQL.pm
b/lib/DBIx/Class/Schema/Loader/DBI/MSSQL.pm
index
ee6d18a
..
5cfeb26
100644
(file)
--- a/
lib/DBIx/Class/Schema/Loader/DBI/MSSQL.pm
+++ b/
lib/DBIx/Class/Schema/Loader/DBI/MSSQL.pm
@@
-278,6
+278,9
@@
wHERE table_name = @{[ $dbh->quote($table) ]} AND column_name = @{[ $dbh->quote(
if ((eval { lc ${ $info->{default_value} } }||'') eq 'getdate()') {
${ $info->{default_value} } = 'current_timestamp';
+
+ my $getdate = 'getdate()';
+ $info->{original}{default_value} = \$getdate;
}
}
}