From: Arthur Axel 'fREW' Schmidt Date: Tue, 1 Jun 2010 02:07:48 +0000 (-0500) Subject: Initial work on specification docs X-Git-Tag: v0.001000_13~7 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=03882cab69ef7ea36a1873990d94f483bf2f314e;p=dbsrgits%2FDBIx-Class-DeploymentHandler.git Initial work on specification docs --- diff --git a/lib/DBIx/Class/DeploymentHandler/DeployMethod/SQL/Translator.pm b/lib/DBIx/Class/DeploymentHandler/DeployMethod/SQL/Translator.pm index 3dc9d9b..ba85a31 100644 --- a/lib/DBIx/Class/DeploymentHandler/DeployMethod/SQL/Translator.pm +++ b/lib/DBIx/Class/DeploymentHandler/DeployMethod/SQL/Translator.pm @@ -659,6 +659,14 @@ modifications, so even if you are familiar with it, please read this. I feel like the best way to describe the layout is with the following example: $sql_migration_dir + |- _protoschema + | |- schema + | |- 1 + | | `- 001-auto.yml + | |- 2 + | | `- 001-auto.yml + | `- 3 + | `- 001-auto.yml |- SQLite | |- down | | `- 2-1 @@ -729,6 +737,36 @@ Until people have used this more it will remain freeform, but a recommended use of preinstall is to have it prompt for username and password, and then call the appropriate C<< CREATE DATABASE >> commands etc. +=head2 Directory Specification + +The following subdirectories are recognized by this DeployMethod: + +=over 2 + +=item C<_protoschema> This directory can have the following subdirs: + +=over 2 + +=item C This directory merely contains directories named after +migrations, which are of the form C<$from_version-$to_version>. Inside of +these directories you may put Perl scripts which are to return a subref +that takes the arguments C<< $from_schema, $to_schema >>, which are +L objects. + +=item C This directory merely contains directories named after +migrations, which are of the form C<$from_version-$to_version>. Inside of +these directories you may put Perl scripts which are to return a subref +that takes the arguments C<< $from_schema, $to_schema >>, which are +L objects. + +=item C This directory merely contains directories named after schema +versions, which in turn contain C files that are serialized versions +of the schema at that version. These files are not for editing by hand. + +=back + +=back + =head1 PERL SCRIPTS A perl script for this tool is very simple. It merely needs to contain an