NAME

DBIO::MSSQL::Diff::ForeignKey - Diff operations for MSSQL foreign keys

VERSION

version 0.900000

DESCRIPTION

Represents a foreign key diff operation: ADD CONSTRAINT or DROP CONSTRAINT. FKs on a brand-new table are created inline by DBIO::MSSQL::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. MSSQL has no ALTER for a foreign key, so a definition change becomes a drop-then-add pair. Local and remote column lists are order-significant, so they are compared as dim fields.

METHODS

diff

my @ops = DBIO::MSSQL::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.