[Bast-commits] r9486 - in
DBIx-Class/0.08/branches/dbicadmin-non-versioned:
lib/DBIx/Class t/admin t/lib
ribasushi at dev.catalyst.perl.org
ribasushi at dev.catalyst.perl.org
Mon May 31 17:35:31 GMT 2010
Author: ribasushi
Date: 2010-05-31 18:35:31 +0100 (Mon, 31 May 2010)
New Revision: 9486
Modified:
DBIx-Class/0.08/branches/dbicadmin-non-versioned/lib/DBIx/Class/Admin.pm
DBIx-Class/0.08/branches/dbicadmin-non-versioned/t/admin/02ddl.t
DBIx-Class/0.08/branches/dbicadmin-non-versioned/t/lib/DBICVersion_v1.pm
DBIx-Class/0.08/branches/dbicadmin-non-versioned/t/lib/DBICVersion_v2.pm
Log:
Fix RT#57732
Modified: DBIx-Class/0.08/branches/dbicadmin-non-versioned/lib/DBIx/Class/Admin.pm
===================================================================
--- DBIx-Class/0.08/branches/dbicadmin-non-versioned/lib/DBIx/Class/Admin.pm 2010-05-31 17:24:54 UTC (rev 9485)
+++ DBIx-Class/0.08/branches/dbicadmin-non-versioned/lib/DBIx/Class/Admin.pm 2010-05-31 17:35:31 UTC (rev 9486)
@@ -353,6 +353,7 @@
# schema is unversioned
$schema->throw_exception ("Could not determin current schema version, please either install() or deploy().\n");
} else {
+ $schema->upgrade_directory ($self->sql_dir) if $self->sql_dir; # this will override whatever default the schema has
my $ret = $schema->upgrade();
return $ret;
}
Modified: DBIx-Class/0.08/branches/dbicadmin-non-versioned/t/admin/02ddl.t
===================================================================
--- DBIx-Class/0.08/branches/dbicadmin-non-versioned/t/admin/02ddl.t 2010-05-31 17:24:54 UTC (rev 9485)
+++ DBIx-Class/0.08/branches/dbicadmin-non-versioned/t/admin/02ddl.t 2010-05-31 17:35:31 UTC (rev 9486)
@@ -51,12 +51,6 @@
{ # upgrade schema
-#my $schema = DBICTest->init_schema(
-# no_deploy => 1,
-# no_populat => 1,
-# sqlite_use_file => 1,
-#);
-
clean_dir($sql_dir);
require DBICVersion_v1;
@@ -78,6 +72,7 @@
require DBICVersion_v2;
+DBICVersion::Schema->upgrade_directory (undef); # so that we can test use of $sql_dir
$admin = DBIx::Class::Admin->new(
schema_class => 'DBICVersion::Schema',
Modified: DBIx-Class/0.08/branches/dbicadmin-non-versioned/t/lib/DBICVersion_v1.pm
===================================================================
--- DBIx-Class/0.08/branches/dbicadmin-non-versioned/t/lib/DBICVersion_v1.pm 2010-05-31 17:24:54 UTC (rev 9485)
+++ DBIx-Class/0.08/branches/dbicadmin-non-versioned/t/lib/DBICVersion_v1.pm 2010-05-31 17:35:31 UTC (rev 9486)
@@ -36,12 +36,8 @@
__PACKAGE__->register_class('Table', 'DBICVersion::Table');
__PACKAGE__->load_components('+DBIx::Class::Schema::Versioned');
+__PACKAGE__->upgrade_directory('t/var/');
-sub upgrade_directory
-{
- return 't/var/';
-}
-
sub ordered_schema_versions {
return('1.0','2.0','3.0');
}
Modified: DBIx-Class/0.08/branches/dbicadmin-non-versioned/t/lib/DBICVersion_v2.pm
===================================================================
--- DBIx-Class/0.08/branches/dbicadmin-non-versioned/t/lib/DBICVersion_v2.pm 2010-05-31 17:24:54 UTC (rev 9485)
+++ DBIx-Class/0.08/branches/dbicadmin-non-versioned/t/lib/DBICVersion_v2.pm 2010-05-31 17:35:31 UTC (rev 9486)
@@ -47,9 +47,4 @@
__PACKAGE__->upgrade_directory('t/var/');
__PACKAGE__->backup_directory('t/var/backup/');
-#sub upgrade_directory
-#{
-# return 't/var/';
-#}
-
1;
More information about the Bast-commits
mailing list