0.44_01 not released
- POD fixes from Xavier Guimard <x.guimard@free.fr> and Damyan Ivanov
<dmn@debian.org> of the Debian Perl Group, closes: CPAN#82187
+ - More foreign key support
+ + table alteration (removing foreign keys)
0.43 2013-11-04 14:58;32 PST
- Incorporate CPAN::Changes::Spec-compliant Changes file from Neil Bowers
use DBIx::DBSchema::Column;
use DBIx::DBSchema::ForeignKey;
-our $VERSION = '0.44_01';
+our $VERSION = '0.44_02';
$VERSION = eval $VERSION; # modperlstyle: convert the string into a number
our $DEBUG = 0;
use strict;
-our $VERSION = '0.1';
+our $VERSION = '0.11';
our $DEBUG = 0;
=head1 NAME
=item constraint [ CONSTRAINT_NAME ]
-Returns or sets the foreign table name
+Returns or sets the constraint name
=cut
}
}
-
-
=item sql_foreign_key
Returns an SQL FOREIGN KEY statement.
my( $self, $other ) = @_;
$self->table eq $other->table
- and $self->columns_sql eq $other->columns_sql
+ and $self->columns_sql eq $other->columns_sql
and $self->references_sql eq $other->references_sql
+ and uc($self->match) eq uc($other->match)
+ and uc($self->on_delete) eq uc($other->on_delete)
+ and uc($self->on_update) eq uc($other->on_update)
;
}
use DBIx::DBSchema::_util qw(_load_driver _dbh _parse_opt);
use DBIx::DBSchema::Column 0.14;
use DBIx::DBSchema::Index;
-use DBIx::DBSchema::ForeignKey;
+use DBIx::DBSchema::ForeignKey 0.11;
-our $VERSION = '0.10';
+our $VERSION = '0.11';
our $DEBUG = 0;
=head1 NAME
my @at = ();
- ###
# foreign keys (add)
- ###
-
foreach my $foreign_key ( $new->foreign_keys ) {
next if grep $foreign_key->cmp($_), $self->foreign_keys;
push @at, 'ADD '. $foreign_key->sql_foreign_key;
}
- ###
- # XXX TODO foreign keys modify / drop
- ###
+ #foreign keys (drop)
+ foreach my $foreign_key ( $self->foreign_keys ) {
+
+ next if grep $foreign_key->cmp($_), $new->foreign_keys;
+ next unless $foreign_key->constraint;
+
+ push @at, 'DROP CONSTRAINT '. $foreign_key->constraint;
+ }
return () unless @at;
(
-libdbix-dbschema-perl (0.43-1) unstable; urgency=low
+libdbix-dbschema-perl (0.44~02-2) UNRELEASED; urgency=low
- * new upstream release
+ * new upstream (test) release
+
+ -- Ivan Kohler <ivan-debian@420.am> Fri, 15 Nov 2013 17:33:02 -0800
+
+libdbix-dbschema-perl (0.43~02-1) unstable; urgency=low
+
+ * new upstream (test) release
-- Ivan Kohler <ivan-debian@420.am> Mon, 04 Nov 2013 14:59:03 -0800