projects
/
dbsrgits/DBIx-Class-Schema-Loader.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
fix default_value for all other backends, fix bug with quoted Pg tables from $dbh...
[dbsrgits/DBIx-Class-Schema-Loader.git]
/
lib
/
DBIx
/
Class
/
Schema
/
Loader
/
DBI
/
Component
/
QuotedDefault.pm
diff --git
a/lib/DBIx/Class/Schema/Loader/DBI/Component/QuotedDefault.pm
b/lib/DBIx/Class/Schema/Loader/DBI/Component/QuotedDefault.pm
index
f1e8529
..
a644147
100644
(file)
--- a/
lib/DBIx/Class/Schema/Loader/DBI/Component/QuotedDefault.pm
+++ b/
lib/DBIx/Class/Schema/Loader/DBI/Component/QuotedDefault.pm
@@
-30,7
+30,8
@@
sub _columns_info_for {
$def =~ s/^\s+//;
$def =~ s/\s+\z//;
- if ($def =~ /^["'](.*?)['"]\z/) {
+# remove Pg typecasts (e.g. 'foo'::character varying) too
+ if ($def =~ /^["'](.*?)['"](?:::[\w\s]+)?\z/) {
$info->{default_value} = $1;
}
else {