projects
/
DBIx-DBSchema.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4d092e0
)
delcolumn, version bump for dependencies
author
ivan
<ivan>
Mon, 30 Jul 2001 07:38:43 +0000
(07:38 +0000)
committer
ivan
<ivan>
Mon, 30 Jul 2001 07:38:43 +0000
(07:38 +0000)
DBSchema.pm
patch
|
blob
|
history
DBSchema/Table.pm
patch
|
blob
|
history
diff --git
a/DBSchema.pm
b/DBSchema.pm
index
7149d6d
..
418fadf
100644
(file)
--- a/
DBSchema.pm
+++ b/
DBSchema.pm
@@
-14,7
+14,7
@@
use DBIx::DBSchema::ColGroup::Index;
#@ISA = qw(Exporter);
@ISA = ();
#@ISA = qw(Exporter);
@ISA = ();
-$VERSION = "0.1
7
";
+$VERSION = "0.1
8
";
=head1 NAME
=head1 NAME
diff --git
a/DBSchema/Table.pm
b/DBSchema/Table.pm
index
50700b6
..
e4bc2dd
100644
(file)
--- a/
DBSchema/Table.pm
+++ b/
DBSchema/Table.pm
@@
-230,6
+230,20
@@
sub addcolumn {
push @{$self->{'column_order'}}, $column->name;
}
push @{$self->{'column_order'}}, $column->name;
}
+=item delcolumn COLUMN_NAME
+
+Deletes this column. Returns false if no column of this name was found to
+remove, true otherwise.
+
+=cut
+
+sub delcolumn {
+ my($self,$column) = @_;
+ return 0 unless exists $self->{'columns'}{$column};
+ delete $self->{'columns'}{$column};
+ @{$self->{'column_order'}}= grep { $_ ne $column } @{$self->{'column_order'}}; 1;
+}
+
=item name [ TABLE_NAME ]
Returns or sets the table name.
=item name [ TABLE_NAME ]
Returns or sets the table name.