projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
0e0e102
)
added Pg-specific behaviour in sub line
author
ivan
<ivan>
Mon, 12 Oct 1998 23:40:28 +0000
(23:40 +0000)
committer
ivan
<ivan>
Mon, 12 Oct 1998 23:40:28 +0000
(23:40 +0000)
site_perl/dbdef_column.pm
patch
|
blob
|
history
diff --git
a/site_perl/dbdef_column.pm
b/site_perl/dbdef_column.pm
index
023b57d
..
06388c6
100644
(file)
--- 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;
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.')' : '' ),
join(' ',
$self->name,
$self->type. ( $self->length ? '('.$self->length.')' : '' ),
@@
-159,6
+165,10
@@
sub line {
L<FS::dbdef_table>, L<FS::dbdef>, L<DBI>
L<FS::dbdef_table>, L<FS::dbdef>, L<DBI>
+=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
=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
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;
=cut
1;