initial pod docs
Arthur Axel 'fREW' Schmidt [Tue, 30 Mar 2010 03:37:48 +0000 (22:37 -0500)]
lib/DBIx/Class/DeploymentHandler/DeployMethod/SQL/Translator.pm
lib/DBIx/Class/DeploymentHandler/HandlesDeploy.pm
lib/DBIx/Class/DeploymentHandler/HandlesVersionStorage.pm
lib/DBIx/Class/DeploymentHandler/HandlesVersioning.pm

index 2ff2375..65c57c5 100644 (file)
@@ -282,18 +282,12 @@ sub prepare_install {
 
 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');
 }
 
index edb52e6..4ff7694 100644 (file)
@@ -14,4 +14,46 @@ requires 'deploy';
 
 __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
index 8f535b4..9881817 100644 (file)
@@ -10,4 +10,26 @@ requires 'version_storage_is_installed';
 
 __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
index c3d15dd..495c8bb 100644 (file)
@@ -9,6 +9,18 @@ requires 'previous_version_set';
 
 __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.