NAME
DBIO::DB2::Diff::ForeignKey - Diff operations for DB2 foreign keys
VERSION
version 0.900000
DESCRIPTION
Represents a foreign key diff operation: ADD CONSTRAINT or DROP FOREIGN KEY. FKs on a brand-new table are created inline by DBIO::DB2::Diff::Table; this module handles FK changes on tables that exist in both source and target. Built on DBIO::Diff::Op.
FK identity is by constraint_name. DB2 has no ALTER for a foreign key definition, so a change becomes a drop-then-add pair (drop first). The deterministic FK name emitted by DBIO::DB2::DDL round-trips through introspection, so source and target carry the same stable name and the name-based match does not phantom-diff (see ADR 0005). The DROP uses the real server name carried in the model.
METHODS
diff
my @ops = DBIO::DB2::Diff::ForeignKey->diff(
$source_fks, $target_fks, $source_tables, $target_tables,
);
as_sql
summary
AUTHOR
DBIO & DBIx::Class Authors
COPYRIGHT AND LICENSE
Copyright (C) 2026 DBIO Authors Portions Copyright (C) 2005-2025 DBIx::Class Authors Based on DBIx::Class, heavily modified.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.