1DBIx::Class::DeploymentUHsaenrdlCeorn:tD:rBHiIabxnu:dt:leCedlsaDPseespr:ll:oDyDe(op3cl)uomyemnetnattHiaonndler::HandlesDeploy(3)
2
3
4
6 DBIx::Class::DeploymentHandler::HandlesDeploy - Interface for deploy
7 methods
8
10 · DBIx::Class::DeploymentHandler::DeployMethod::SQL::Translator
11
12 · DBIx::Class::DeploymentHandler::DeployMethod::SQL::Translator::Deprecated
13
15 initialize
16 $dh->initialize({
17 version => 1,
18 storage_type => 'SQLite'
19 });
20
21 Run scripts before deploying to the database
22
23 prepare_deploy
24 $dh->prepare_deploy
25
26 Generate the needed data files to install the schema to the database.
27
28 deploy
29 $dh->deploy({ version => 1 })
30
31 Deploy the schema to the database.
32
33 prepare_resultsource_install
34 $dh->prepare_resultsource_install({
35 result_source => $resultset->result_source,
36 })
37
38 Takes a DBIx::Class::ResultSource and generates a single migration file
39 to create the resultsource's table.
40
41 install_resultsource
42 $dh->install_resultsource({
43 result_source => $resultset->result_source,
44 version => 1,
45 })
46
47 Takes a DBIx::Class::ResultSource and runs a single migration file to
48 deploy the resultsource's table.
49
50 prepare_upgrade
51 $dh->prepare_upgrade({
52 from_version => 1,
53 to_version => 2,
54 version_set => [1, 2]
55 });
56
57 Takes two versions and a version set. This basically is supposed to
58 generate the needed "SQL" to migrate up from the first version to the
59 second version. The version set uniquely identifies the migration.
60
61 prepare_downgrade
62 $dh->prepare_downgrade({
63 from_version => 2,
64 to_version => 1,
65 version_set => [1, 2]
66 });
67
68 Takes two versions and a version set. This basically is supposed to
69 generate the needed "SQL" to migrate down from the first version to the
70 second version. The version set uniquely identifies the migration and
71 should match its respective upgrade version set.
72
73 upgrade_single_step
74 my ($ddl, $sql) = @{
75 $dh->upgrade_single_step({ version_set => $version_set })
76 ||[]}
77
78 Call a single upgrade migration. Takes a version set as an argument.
79 Optionally return "[ $ddl, $upgrade_sql ]" where $ddl is the DDL for
80 that version of the schema and $upgrade_sql is the SQL that was run to
81 upgrade the database.
82
83 downgrade_single_step
84 $dh->downgrade_single_step($version_set);
85
86 Call a single downgrade migration. Takes a version set as an argument.
87 Optionally return "[ $ddl, $upgrade_sql ]" where $ddl is the DDL for
88 that version of the schema and $upgrade_sql is the SQL that was run to
89 upgrade the database.
90
91 txn_do
92 $dh->txn_do(sub { ... })
93
94 Wrap the passed coderef in a transaction (if transactions are enabled.)
95
97 Arthur Axel "fREW" Schmidt <frioux+cpan@gmail.com>
98
100 This software is copyright (c) 2018 by Arthur Axel "fREW" Schmidt.
101
102 This is free software; you can redistribute it and/or modify it under
103 the same terms as the Perl 5 programming language system itself.
104
105
106
107perl v5.28.0 DBIx2:0:1C8l-a0s1s-:0:6DeploymentHandler::HandlesDeploy(3)