1 package DBIx::Class::DeploymentHandler::HandlesDeploy;
4 # ABSTRACT: Interface for deploy methods
8 requires 'prepare_deploy';
11 requires 'prepare_resultsource_install';
12 requires 'install_resultsource';
14 requires 'prepare_upgrade';
15 requires 'upgrade_single_step';
17 requires 'prepare_downgrade';
18 requires 'downgrade_single_step';
22 # vim: ts=2 sw=2 expandtab
30 storage_type => 'SQLite'
33 Run scripts before deploying to the database
35 =method prepare_deploy
39 Generate the needed data files to install the schema to the database.
43 $dh->deploy({ version => 1 })
45 Deploy the schema to the database.
47 =method prepare_resultsource_install
49 $dh->prepare_resultsource_install({
50 result_source => $resultset->result_source,
53 Takes a L<DBIx::Class::ResultSource> and generates a single migration file to
54 create the resultsource's table.
56 =method install_resultsource
58 $dh->install_resultsource({
59 result_source => $resultset->result_source,
63 Takes a L<DBIx::Class::ResultSource> and runs a single migration file to
64 deploy the resultsource's table.
66 =method prepare_upgrade
68 $dh->prepare_upgrade({
74 Takes two versions and a version set. This basically is supposed to generate
75 the needed C<SQL> to migrate up from the first version to the second version.
76 The version set uniquely identifies the migration.
78 =method prepare_downgrade
80 $dh->prepare_downgrade({
86 Takes two versions and a version set. This basically is supposed to generate
87 the needed C<SQL> to migrate down from the first version to the second version.
88 The version set uniquely identifies the migration and should match it's
89 respective upgrade version set.
91 =method upgrade_single_step
94 $dh->upgrade_single_step({ version_set => $version_set })
97 Call a single upgrade migration. Takes a version set as an argument.
98 Optionally return C<< [ $ddl, $upgrade_sql ] >> where C<$ddl> is the DDL for
99 that version of the schema and C<$upgrade_sql> is the SQL that was run to
100 upgrade the database.
102 =method downgrade_single_step
104 $dh->downgrade_single_step($version_set);
106 Call a single downgrade migration. Takes a version set as an argument.
107 Optionally return C<< [ $ddl, $upgrade_sql ] >> where C<$ddl> is the DDL for
108 that version of the schema and C<$upgrade_sql> is the SQL that was run to
109 upgrade the database.
111 =head1 KNOWN IMPLEMENTATIONS
117 L<DBIx::Class::DeploymentHandler::DeployMethod::SQL::Translator>
121 L<DBIx::Class::DeploymentHandler::DeployMethod::SQL::Translator::Deprecated>