sub prepare_upgrade {
my ($self, $from_version, $to_version, $version_set) = @_;
- # for updates prepared automatically (rob's stuff)
- # one would want to explicitly set $version_set to
- # [$to_version]
$self->_prepare_changegrade($from_version, $to_version, $version_set, 'up');
}
sub prepare_downgrade {
my ($self, $from_version, $to_version, $version_set) = @_;
- # for updates prepared automatically (rob's stuff)
- # one would want to explicitly set $version_set to
- # [$to_version]
$self->_prepare_changegrade($from_version, $to_version, $version_set, 'down');
}
__END__
+# should this be renamed prepare_deploy?
+
+=method prepare_install
+
+ $deploy_method->prepare_install;
+
+=method deploy
+
+ $deploy_method->deploy;
+
+=method prepare_resultsource_install
+
+ $deploy_method->prepare_resultsource_install($resultset->result_source);
+
+=method install_resultsource
+
+ $deploy_method->prepare_resultsource_install($resultset->result_source);
+
+# for updates prepared automatically (rob's stuff)
+# one would want to explicitly set $version_set to
+# [$to_version]
+
+=method prepare_upgrade
+
+ $deploy_method->prepare_upgrade(1, 2, [1, 2]);
+
+# for updates prepared automatically (rob's stuff)
+# one would want to explicitly set $version_set to
+# [$to_version]
+
+=method prepare_downgrade
+
+ $deploy_method->prepare_downgrade(2, 1, [1, 2]);
+
+=method upgrade_single_step
+
+ $deploy_method->upgrade_single_step([1, 2]);
+
+=method downgrade_single_step
+
+ $deploy_method->upgrade_single_step([1, 2]);
+
vim: ts=2 sw=2 expandtab
__END__
+=method database_version
+
+ my $db_version = $version_storage->database_version;
+
+=method add_database_version
+
+ $version_storage->add_database_version({
+ version => '1.2002',
+ ddl => $ddl, # optional
+ upgrade_sql => undef, # optional
+ })
+
+=method delete_database_version
+
+ $version_storage->delete_database_version({ version => '1.2002' })
+
+=method version_storage_is_installed
+
+ if ($verson_storage->version_storage_is_installed) {
+ say q(you're golden!)
+ }
+
vim: ts=2 sw=2 expandtab
__END__
+=method next_version_set
+
+ while (my $version_set = $versions->next_version_set) {
+ ...
+ }
+
+=method previous_version_set
+
+ while (my $version_set = $versions->previous_version_set) {
+ ...
+ }
+
# normally a VersionHandler will take
# a to_version and yeild an iterator of
# "version sets" or something like that.