NAME

DBIO::Firebird::Diff::Table - Diff operations for Firebird tables

VERSION

version 0.900004

DESCRIPTION

Represents a table-level diff operation in Firebird: CREATE TABLE or DROP TABLE. create ops capture the target columns so as_sql can emit the full definition in a single statement. The foreign keys and unique constraints of the new table are separate operations (DBIO::Firebird::Diff::Constraint) that run after all tables exist.

METHODS

diff

my @ops = DBIO::Firebird::Diff::Table->diff(
    $source_tables, $target_tables,
    $target_columns, $target_fks, $source_columns, $source_fks,
);

The created tables, then the dropped ones in the order of the foreign keys of $source_fks (the foreign_keys section of the source model): a table that another dropped table's key points at is dropped after it. Where dropped tables point at each other, ALTER TABLE ... DROP CONSTRAINT operations (DBIO::Firebird::Diff::Constraint, action drop) for the keys among them come first. A key from a table that is kept is not this method's business: the server refuses the drop of its target, and the key is a constraint difference. Views are not this method's: their creation and removal are DBIO::Firebird::Diff::View. A name that is a table on one side and a view on the other is a change operation, refused (see "refusal").

refusal

my $reason = $op->refusal;

The reason this operation is refused, else undef. A name that is a table in the database and a view in the schema, or the reverse, is refused: dropping the table to create the view (or the view to create the table) is not a change this diff makes on its own (views that are views on both sides are DBIO::Firebird::Diff::View).

refusal_error

The text of the error for a list of refused operations: every name once.

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.