NAME
DBIO::DB2::Diff::Index - Diff operations for DB2 indexes
VERSION
version 0.900001
DESCRIPTION
Index-level diff operations for DB2. DB2 supports CREATE INDEX and DROP INDEX. Changed index definitions become a drop-then-create pair. Index names must be unique within a schema.
new, action and summary_prefix come from DBIO::Diff::Op.
METHODS
diff
my @ops = DBIO::DB2::Diff::Index->diff(
$source, $target, $source_tables, $target_tables);
Compares index sets across all tables. Index identity is by name; changed definitions produce a drop-then-create pair.
The optional $source_tables / $target_tables hashrefs are the tables sections of the two models (threaded in by DBIO::DB2::Diff). They are used to detect tables being dropped in this same diff pass: DB2's DROP TABLE already removes that table's own indexes, so emitting a standalone DROP INDEX for one of them would fail (the index is already gone) and abort the deploy (karr #19). When these arguments are absent (e.g. direct unit-test calls) the dropped set is empty and no drops are suppressed, preserving the original two-argument behaviour.
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.