NAME
DBIO::SQLite::Diff - Compare two introspected SQLite models
VERSION
version 0.900000
DESCRIPTION
DBIO::SQLite::Diff compares two introspected SQLite database models (as produced by DBIO::SQLite::Introspect) and produces a list of structured diff operations. These operations can then be rendered to SQL or a human-readable summary.
my $diff = DBIO::SQLite::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 first (so new tables exist before columns/indexes reference them), then columns, then indexes. Drop ops come last for each layer.
METHODS
target_from_compiled
my $target = DBIO::SQLite::Diff->target_from_compiled($compiled_model);
Translates the neutral model from DBIO::Schema::ModelCompiler into the SQLite introspect-shaped model that diff consumes: native types land in data_type, and primary-key columns are reported as nullable to match how SQLite's PRAGMA table_info reports them (PK columns are notnull=0 unless explicitly declared NOT NULL).
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.