From: Arthur Axel 'fREW' Schmidt Date: Sat, 27 Feb 2010 10:15:00 +0000 (-0600) Subject: rename create_update_ddl to prepare_update X-Git-Tag: v0.001000_01~112 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=199410d3e84cf0c8a9c77c032ab882c29ad9acfd;p=dbsrgits%2FDBIx-Class-DeploymentHandler.git rename create_update_ddl to prepare_update --- diff --git a/lib/DBIx/Class/DeploymentHandler/SqltDeployMethod.pm b/lib/DBIx/Class/DeploymentHandler/SqltDeployMethod.pm index 4977910..8c8bab7 100644 --- a/lib/DBIx/Class/DeploymentHandler/SqltDeployMethod.pm +++ b/lib/DBIx/Class/DeploymentHandler/SqltDeployMethod.pm @@ -213,7 +213,7 @@ method prepare_install { } } -method create_update_ddl($version, $preversion) { +method prepare_update($version, $preversion) { my $schema = $self->schema; my $databases = $self->databases; my $dir = $self->upgrade_directory; @@ -319,7 +319,7 @@ method create_update_ddl($version, $preversion) { method create_ddl_dir($version, $preversion) { $self->prepare_install; - $self->create_update_ddl($version, $preversion) if $preversion; + $self->prepare_update($version, $preversion) if $preversion; } method _read_sql_file($file) { diff --git a/lib/DBIx/Class/DeploymentHandler/WithSqltDeployMethod.pm b/lib/DBIx/Class/DeploymentHandler/WithSqltDeployMethod.pm index 06f6f14..7141b65 100644 --- a/lib/DBIx/Class/DeploymentHandler/WithSqltDeployMethod.pm +++ b/lib/DBIx/Class/DeploymentHandler/WithSqltDeployMethod.pm @@ -20,7 +20,7 @@ has deploy_method => ( deployment_statements deploy prepare_install - create_update_ddl + prepare_update create_ddl_dir upgrade_single_step }], diff --git a/t/02-instantiation.t b/t/02-instantiation.t index c7fde9b..2b2499c 100644 --- a/t/02-instantiation.t +++ b/t/02-instantiation.t @@ -61,7 +61,7 @@ VERSION2: { $version = $s->schema_version(); $handler->prepare_install(); - $handler->create_update_ddl($version, '1.0'); + $handler->prepare_update($version, '1.0'); ok(-e 't/sql/DBICVersion-Schema-2.0-SQLite.sql', 'DDL for 2.0 got created successfully'); ok(-e 't/sql/DBICVersion-Schema-1.0-2.0-SQLite.sql', 'DDL for migration from 1.0 to 2.0 got created successfully'); dies_ok { @@ -100,8 +100,8 @@ VERSION3: { $version = $s->schema_version(); $handler->prepare_install; - $handler->create_update_ddl( $version, '1.0'); - $handler->create_update_ddl( $version, '2.0'); + $handler->prepare_update( $version, '1.0'); + $handler->prepare_update( $version, '2.0'); ok(-e 't/sql/DBICVersion-Schema-3.0-SQLite.sql', 'DDL for 3.0 got created successfully'); ok(-e 't/sql/DBICVersion-Schema-1.0-3.0-SQLite.sql', 'DDL for migration from 1.0 to 3.0 got created successfully'); ok(-e 't/sql/DBICVersion-Schema-2.0-3.0-SQLite.sql', 'DDL for migration from 2.0 to 3.0 got created successfully');