NAME

DBIO::MSSQL::Diff::Index - Diff operations for MSSQL indexes

VERSION

version 0.900001

DESCRIPTION

Index-level diff operations for MSSQL. MSSQL supports CREATE INDEX, DROP INDEX, and CREATE INDEX ... DROP_EXISTING. Built on DBIO::Diff::Op (the nested walk). A definition change is a drop-then- create pair. Index column order is significant, so the column list is compared as an order-preserving dim field (not the order-independent default of "changed_index_fields" in DBIO::Diff::Compare).

METHODS

diff

my @ops = DBIO::MSSQL::Diff::Index->diff(
  $source, $target, $source_tables, $target_tables);

The optional $source_tables / $target_tables hashrefs are the tables sections of the two models (threaded in by DBIO::MSSQL::Diff). They detect tables that are being dropped in this same diff pass: MSSQL's DROP TABLE already removes that table's own indexes, so emitting a standalone DROP INDEX ... ON <table> for one of them would fail once the table is gone and abort the deploy (karr #15). When these arguments are absent (e.g. direct unit-test calls) the 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.