From: ivan Date: Mon, 12 Oct 1998 23:40:28 +0000 (+0000) Subject: added Pg-specific behaviour in sub line X-Git-Tag: freeside_1_2_0~224 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=985d84813a195f343abaf7e33f08057efcb5cb10 added Pg-specific behaviour in sub line --- diff --git a/site_perl/dbdef_column.pm b/site_perl/dbdef_column.pm index 023b57d1f..06388c691 100644 --- a/site_perl/dbdef_column.pm +++ b/site_perl/dbdef_column.pm @@ -143,7 +143,13 @@ supported in the future. sub line { my($self,$datasrc)=@_; my($null)=$self->null; - $null ||= "NOT NULL" if $datasrc =~ /mysql/; #yucky mysql hack + if ( $datasrc =~ /mysql/ ) { #yucky mysql hack + $null ||= "NOT NULL" + } + if ( $datasrc =~ /Pg/ ) { #yucky Pg hack + $null ||= "NOT NULL"; + $null =~ s/^NULL$//; + } join(' ', $self->name, $self->type. ( $self->length ? '('.$self->length.')' : '' ), @@ -159,6 +165,10 @@ sub line { L, L, L +=head1 VERSION + +$Id: dbdef_column.pm,v 1.2 1998-10-12 23:40:28 ivan Exp $ + =head1 HISTORY class for dealing with column definitions @@ -169,6 +179,11 @@ now methods can be used to get or set data ivan@sisd.com 98-may-11 mySQL-specific hack for null (what should be default?) ivan@sisd.com 98-jun-2 +$Log: dbdef_column.pm,v $ +Revision 1.2 1998-10-12 23:40:28 ivan +added Pg-specific behaviour in sub line + + =cut 1;