GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
DBIx::Class::DeploymentHandler::HandlesDeploy(3) User Contributed Perl Documentation DBIx::Class::DeploymentHandler::HandlesDeploy(3)

DBIx::Class::DeploymentHandler::HandlesDeploy - Interface for deploy methods

  • DBIx::Class::DeploymentHandler::DeployMethod::SQL::Translator
  • DBIx::Class::DeploymentHandler::DeployMethod::SQL::Translator::Deprecated

 $dh->initialize({
   version      => 1,
   storage_type => 'SQLite'
 });

Run scripts before deploying to the database

 $dh->prepare_deploy

Generate the needed data files to install the schema to the database.

 $dh->deploy({ version => 1 })

Deploy the schema to the database.

 $dh->prepare_resultsource_install({
   result_source => $resultset->result_source,
 })

Takes a DBIx::Class::ResultSource and generates a single migration file to create the resultsource's table.

 $dh->install_resultsource({
   result_source => $resultset->result_source,
   version       => 1,
 })

Takes a DBIx::Class::ResultSource and runs a single migration file to deploy the resultsource's table.

 $dh->prepare_upgrade({
   from_version => 1,
   to_version   => 2,
   version_set  => [1, 2]
 });

Takes two versions and a version set. This basically is supposed to generate the needed "SQL" to migrate up from the first version to the second version. The version set uniquely identifies the migration.

 $dh->prepare_downgrade({
   from_version => 2,
   to_version   => 1,
   version_set  => [1, 2]
 });

Takes two versions and a version set. This basically is supposed to generate the needed "SQL" to migrate down from the first version to the second version. The version set uniquely identifies the migration and should match its respective upgrade version set.

 my ($ddl, $sql) = @{
   $dh->upgrade_single_step({ version_set => $version_set })
 ||[]}

Call a single upgrade migration. Takes a version set as an argument. Optionally return "[ $ddl, $upgrade_sql ]" where $ddl is the DDL for that version of the schema and $upgrade_sql is the SQL that was run to upgrade the database.

 $dh->downgrade_single_step($version_set);

Call a single downgrade migration. Takes a version set as an argument. Optionally return "[ $ddl, $upgrade_sql ]" where $ddl is the DDL for that version of the schema and $upgrade_sql is the SQL that was run to upgrade the database.

 $dh->txn_do(sub { ... })

Wrap the passed coderef in a transaction (if transactions are enabled.)

Arthur Axel "fREW" Schmidt <frioux+cpan@gmail.com>

This software is copyright (c) 2019 by Arthur Axel "fREW" Schmidt.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

2019-09-25 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.