NAME

DBIO::DuckDB::Diff - Compare two introspected DuckDB models

VERSION

version 0.900000

DESCRIPTION

DBIO::DuckDB::Diff compares two introspected DuckDB models (produced by DBIO::DuckDB::Introspect) and emits a list of structured diff operations that can be rendered to SQL or a human-readable summary.

my $diff = DBIO::DuckDB::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. Drops come last for each layer.

AUTHOR

DBIO Authors

COPYRIGHT AND LICENSE

Copyright (C) 2026 DBIO Authors

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.