NAME

DBIO::SQLite::DDL - Generate SQLite DDL from DBIO Result classes

VERSION

version 0.900000

DESCRIPTION

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

my $ddl = DBIO::SQLite::DDL->install_ddl($schema_class_or_instance);
# CREATE TABLE ...; CREATE INDEX ...; ...

The output is plain SQL, suitable for executing one statement at a time against a fresh SQLite database.

SQLite has neither schemas nor sequences nor functions/triggers/RLS, so the generated DDL is much smaller than the PostgreSQL equivalent. The only constructs emitted are CREATE TABLE (with inline columns, primary key, unique constraints, foreign keys) and CREATE INDEX.

METHODS

install_ddl

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

Returns the full installation DDL as a single string. $schema may be a connected schema instance or a schema class name.

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.