fixed rels ending with me breaking subquery realiasing
[dbsrgits/DBIx-Class.git] / t / admin / 02ddl.t
index 460ff30..e3ac33a 100644 (file)
@@ -28,6 +28,7 @@ my @connect_info = DBICTest->_database(
   no_populate=>1,
   sqlite_use_file  => 1,
 );
+
 { # create the schema
 
 #  make sure we are  clean
@@ -42,17 +43,14 @@ my $admin = DBIx::Class::Admin->new(
 isa_ok ($admin, 'DBIx::Class::Admin', 'create the admin object');
 lives_ok { $admin->create('MySQL'); } 'Can create MySQL sql';
 lives_ok { $admin->create('SQLite'); } 'Can Create SQLite sql';
-lives_ok { $admin->deploy() } 'Can Deploy schema';
+lives_ok {
+  $SIG{__WARN__} = sub { warn @_ unless $_[0] =~ /no such table.+DROP TABLE/s };
+  $admin->deploy()
+} 'Can Deploy schema';
 }
 
 { # upgrade schema
 
-#my $schema = DBICTest->init_schema(
-#  no_deploy    => 1,
-#  no_populat    => 1,
-#  sqlite_use_file  => 1,
-#);
-
 clean_dir($sql_dir);
 require DBICVersion_v1;
 
@@ -74,6 +72,7 @@ is($schema->get_db_version, $DBICVersion::Schema::VERSION, 'Schema deployed and
 
 
 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',