fix for deploying MySQL schemas. schema debug++
Simon Elliott [Tue, 28 Feb 2006 01:28:25 +0000 (01:28 +0000)]
lib/DBIx/Class/Storage/DBI.pm
lib/DBIx/Class/Storage/DBI/mysql.pm

index ff89c4b..b87648a 100644 (file)
@@ -530,7 +530,9 @@ sub deployment_statements {
 
 sub deploy {
   my ($self, $schema, $type) = @_;
-  $self->dbh->do($_) for split(";\n", $self->deployment_statements($schema, $type));
+  foreach(split(";\n", $self->deployment_statements($schema, $type))) {
+         $self->dbh->do($_) or warn "SQL was:\n $_";
+  } 
 }
 
 sub DESTROY { shift->disconnect }
index dcd124f..d601f1d 100644 (file)
@@ -11,6 +11,10 @@ sub last_insert_id {
   return $_[0]->_dbh->{mysql_insertid};
 }
 
+sub sqlt_type {
+  return 'MySQL';
+}
+
 1;
 
 =head1 NAME