NAME
DBIO::DeploymentHandler::DeployMethod::Native - Native DBIO driver deploy (no SQL::Translator needed)
VERSION
version 0.900004
DESCRIPTION
The deploy method used by DBIO::DeploymentHandler. It hands all DDL work to the driver's native Deploy class, which introspects the live database and reconciles it against the code in one shot, so no SQL::Translator and no prepared per-version DDL files are needed. The Deploy class is taken from the storage's dbio_deploy_class if it has one; otherwise it is derived from the (driver-resolved) storage class by replacing a trailing ::Storage with ::Deploy. Throws if that class cannot be loaded.
Implements DBIO::DeploymentHandler::HandlesDeploy.
ATTRIBUTES
schema
The schema to deploy.
METHODS
new
my $dm = DBIO::DeploymentHandler::DeployMethod::Native->new({
schema => $schema,
txn_wrap => 1,
});
Takes a hashref or a flat list and keeps every key.
deploy
Runs the driver Deploy class's install.
upgrade
Runs the driver Deploy class's upgrade and returns its result (the diff). The key allow_destructive of the argument hash is handed on ("apply" in DBIO::Deploy::Base); without it a diff that drops or may alter stored data does not run.
diff
Returns the driver Deploy class's diff without applying it.
prepare_deploy
prepare_upgrade
prepare_resultsource_install
initialize
install_resultsource
No-ops. The native driver introspects and reconciles in one shot, so there is nothing to prepare in advance; these exist for callers written against the DBIx::Class::DeploymentHandler contract.
txn_do
my $rv = $dm->txn_do(sub { ... });
Runs the coderef inside a $schema->txn_scope_guard and commits, or runs it bare when txn_wrap is false (which it is unless given; DBIO::DeploymentHandler passes 1 by default). Returns the coderef's result.
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.