NAME
DBIO::DB2::Diff - Compare two introspected DB2 models
VERSION
version 0.900000
DESCRIPTION
DBIO::DB2::Diff compares two introspected DB2 models (produced by DBIO::DB2::Introspect) and emits a list of structured diff operations that can be rendered to SQL or a human-readable summary.
my $diff = DBIO::DB2::Diff->new(
source => $current_model,
target => $desired_model,
);
if ($diff->has_changes) {
print $diff->as_sql;
print $diff->summary;
}
Operations are emitted in dependency order: tables, then columns, then indexes, then foreign keys. New-table FKs are created inline by DBIO::DB2::Diff::Table; DBIO::DB2::Diff::ForeignKey handles FK changes on tables present in both models. FKs come last so any referenced table or column already exists. Drops come last for each layer.
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.