NAME
DBIO::Oracle::Diff::Index - Diff operations for Oracle indexes
VERSION
version 0.900007
DESCRIPTION
Index-level diff operations for Oracle.
ATTRIBUTES
index_name
The bare index name.
table_name
The table key the index belongs to: a bare name, or schema.table; the index lives in the schema of its table.
index_info
Hashref of index metadata: is_unique, columns.
METHODS
diff
my @ops = DBIO::Oracle::Diff::Index->diff(
$source, $target, $source_tables, $target_tables,
);
Walks the indexes of tables present in both models, and creates every index of a table that only the target has, after the CREATE TABLE DBIO::Oracle::Diff::Table wrote for it. Source-only tables have their indexes dropped with the table, so they are not walked, and no DROP INDEX follows a DROP TABLE (Oracle refuses it, ORA-01418). The tables decide which tables there are; without them the tables are the keys of the two index sections. The indexes Oracle keeps for a primary key or a unique constraint are not in the model and are not created here; they come with the CREATE TABLE.
An existing index (same name, same table) whose is_unique or columns changed is detected via "changed_index_fields" in DBIO::Diff::Compare and emitted as a drop+create pair -- Oracle has no in-place ALTER INDEX for column or uniqueness changes.
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.