NAME

DBIO::MySQL::DDL - Generate MySQL/MariaDB DDL from DBIO Result classes

VERSION

version 0.900000

DESCRIPTION

DBIO::MySQL::DDL generates a MySQL DDL script from a DBIO::Schema class hierarchy. It is the desired-state side of the test-deploy-and-compare strategy used by DBIO::MySQL::Deploy.

my $ddl = DBIO::MySQL::DDL->install_ddl($schema);

The generated DDL is plain SQL, one CREATE TABLE per source. Tables default to ENGINE=InnoDB and CHARSET=utf8mb4 COLLATE utf8mb4_unicode_ci. Result classes can override per-table via mysql_engine, mysql_charset, mysql_collate attributes.

METHODS

install_ddl

my $ddl = DBIO::MySQL::DDL->install_ddl($schema);

Returns the full installation DDL as a single string.

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.