=item sql_alter_constraints PROTOTYPE_TABLE, [ DATABASE_HANDLE | DATA_SOURCE [ USERNAME PASSWORD [ ATTR ] ] ]
-Returns a list of SQL statements to alter this table so that it is identical
-to the provided table, also a DBIx::DBSchema::Table object.
+Returns a list of SQL statements to alter this table's constraints (foreign
+keys) so that they are identical to the provided table, also a
+DBIx::DBSchema::Table object.
The data source can be specified by passing an open DBI database handle, or by
passing the DBI data source name, username and password.
=cut
-#gosh, false laziness w/DBSchema::sql_update_schema
-
sub sql_alter_constraints {
my($self, $opt, $new, $dbh) = ( shift, _parse_opt(\@_), shift, _dbh(@_) );
push @at, 'ADD '. $foreign_key->sql_foreign_key;
}
- # XXX foreign keys modify / drop
-
+ ###
+ # XXX TODO foreign keys modify / drop
+ ###
+
return () unless @at;
(
'ALTER TABLE '. $self->name. ' '. join(",\n ", @at)