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::Dad(3) User Contributed Perl Documentation DBIx::Class::DeploymentHandler::Dad(3)

DBIx::Class::DeploymentHandler::Dad - Parent class for DeploymentHandlers

See "deploy" in DBIx::Class::DeploymentHandler::HandlesDeploy.

See "version_storage_is_installed" in DBIx::Class::DeploymentHandler::HandlesVersionStorage.

See "add_database_version" in DBIx::Class::DeploymentHandler::HandlesVersionStorage.

See "delete_database_version" in DBIx::Class::DeploymentHandler::HandlesVersionStorage.

See "next_version_set" in DBIx::Class::DeploymentHandler::HandlesVersioning.

See "previous_version_set" in DBIx::Class::DeploymentHandler::HandlesVersioning.

See "upgrade_single_step" in DBIx::Class::DeploymentHandler::HandlesDeploy.

See "downgrade_single_step" in DBIx::Class::DeploymentHandler::HandlesDeploy.

See "txn_do" in DBIx::Class::DeploymentHandler::HandlesDeploy.

These methods are not actually required as things will probably still work if you don't implement them, but if you want your subclass to get along with other subclasses (or more likely, tools made to use another subclass), you should probably implement these too, even if they are no-ops.

see "database_version" in DBIx::Class::DeploymentHandler::HandlesVersionStorage

see "prepare_deploy" in DBIx::Class::DeploymentHandler::HandlesDeploy

see "prepare_resultsource_install" in DBIx::Class::DeploymentHandler::HandlesDeploy

see "install_resultsource" in DBIx::Class::DeploymentHandler::HandlesDeploy

see "prepare_upgrade" in DBIx::Class::DeploymentHandler::HandlesDeploy

see "prepare_downgrade" in DBIx::Class::DeploymentHandler::HandlesDeploy

All of the methods mentioned in "METHODS THAT ARE REQUIRED IN SUBCLASSES" and "ORTHODOX METHODS" can be implemented in any fashion you choose. In the spirit of code reuse I have used roles to implement them in my two subclasses, DBIx::Class::DeploymentHandler and DBIx::Class::DeploymentHandler::Deprecated, but you are free to implement them entirely in a subclass if you so choose to.

For in-depth documentation on how methods are supposed to work, see the roles DBIx::Class::DeploymentHandler::HandlesDeploy, DBIx::Class::DeploymentHandler::HandlesVersioning, and DBIx::Class::DeploymentHandler::HandlesVersionStorage.

The DBIx::Class::Schema (required) that is used to talk to the database and generate the DDL.

The version that the schema is currently at. Defaults to "$self->schema->schema_version".

The directory where backups are stored

The version (defaults to schema's version) to migrate the database to

 $dh->install

or

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

Deploys the requested version into the database Version defaults to "schema_version". Populates "version_storage" with "version" and "ddl".

Note: you typically need to call "$dh->prepare_deploy" before you call this method.

Note: you cannot install on top of an already installed database

 $dh->upgrade

Upgrades the database one step at a time till "next_version_set" returns "undef". Each upgrade step will add a "version", "ddl", and "upgrade_sql" to the version storage (if "ddl" and/or "upgrade_sql" are returned from "upgrade_single_step".

 $dh->downgrade

Downgrades the database one step at a time till "previous_version_set" returns "undef". Each downgrade step will delete a "version" from the version storage.

 $dh->backup

Simply calls backup on the "$schema->storage", passing in "$self->backup_directory" as an argument. Please test yourself before assuming it will work.

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.