NAME

DBIO::MySQL::Diff::Column - Diff operations for MySQL/MariaDB columns

VERSION

version 0.900000

DESCRIPTION

Represents a column-level diff operation in MySQL/MariaDB. Unlike SQLite, MySQL has full ALTER TABLE support so all of ADD COLUMN, DROP COLUMN, and MODIFY COLUMN are emitted directly.

Brand-new tables get their columns inline via DBIO::MySQL::Diff::Table -- this module only sees columns of tables that exist in both source and target.

METHODS

diff

my @ops = DBIO::MySQL::Diff::Column->diff(
    $source_cols, $target_cols,
    $source_tables, $target_tables,
);

Compares column lists for tables that exist in both source and target. Detects added columns, dropped columns, and modified columns (data type, NOT NULL, or default value changes). Returns a list of DBIO::MySQL::Diff::Column objects.

The MySQL column shape carries extras beyond the canonical model (column_type, character_set, collation, numeric_precision, numeric_scale, datetime_precision, values, comment) so we use "changed_fields" in DBIO::Diff::Compare with a MySQL-specific field spec instead of the canonical changed_column_fields.

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.