[freeside-commits] freeside/FS/FS Record.pm,1.196.2.4,1.196.2.5
Ivan,,,
ivan at wavetail.420.am
Sat Jan 9 02:04:29 PST 2010
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv18390
Modified Files:
Tag: FREESIDE_1_9_BRANCH
Record.pm
Log Message:
need DBIx::DBSchema w/quoted_default to make this all work right :/
Index: Record.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Record.pm,v
retrieving revision 1.196.2.4
retrieving revision 1.196.2.5
diff -u -d -r1.196.2.4 -r1.196.2.5
--- Record.pm 16 Dec 2009 15:07:38 -0000 1.196.2.4
+++ Record.pm 9 Jan 2010 10:04:27 -0000 1.196.2.5
@@ -15,7 +15,7 @@
use Text::CSV_XS;
use File::Slurp qw( slurp );
use DBI qw(:sql_types);
-use DBIx::DBSchema 0.33;
+use DBIx::DBSchema 0.38;
use FS::UID qw(dbh getotaker datasrc driver_name);
use FS::CurrentUser;
use FS::Schema qw(dbdef);
@@ -962,12 +962,12 @@
my $db_seq = 0;
if ( $primary_key ) {
my $col = $self->dbdef_table->column($primary_key);
-
+
$db_seq =
uc($col->type) =~ /^(BIG)?SERIAL\d?/
|| ( driver_name eq 'Pg'
&& defined($col->default)
- && $col->default =~ /^nextval\(/i
+ && $col->quoted_default =~ /^nextval\(/i
)
|| ( driver_name eq 'mysql'
&& defined($col->local)
@@ -1032,7 +1032,7 @@
#my $oid = $sth->{'pg_oid_status'};
#my $i_sql = "SELECT $primary_key FROM $table WHERE oid = ?";
- my $default = $self->dbdef_table->column($primary_key)->default;
+ my $default = $self->dbdef_table->column($primary_key)->quoted_default;
unless ( $default =~ /^nextval\(\(?'"?([\w\.]+)"?'/i ) {
dbh->rollback if $FS::UID::AutoCommit;
return "can't parse $table.$primary_key default value".
More information about the freeside-commits
mailing list