From: Simon Elliott Date: Tue, 28 Feb 2006 01:28:25 +0000 (+0000) Subject: fix for deploying MySQL schemas. schema debug++ X-Git-Tag: v0.06000~61^2~6 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e8d293dfb0a738b6ad37f9ce500f517a247c5289;p=dbsrgits%2FDBIx-Class.git fix for deploying MySQL schemas. schema debug++ --- diff --git a/lib/DBIx/Class/Storage/DBI.pm b/lib/DBIx/Class/Storage/DBI.pm index ff89c4b..b87648a 100644 --- a/lib/DBIx/Class/Storage/DBI.pm +++ b/lib/DBIx/Class/Storage/DBI.pm @@ -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 } diff --git a/lib/DBIx/Class/Storage/DBI/mysql.pm b/lib/DBIx/Class/Storage/DBI/mysql.pm index dcd124f..d601f1d 100644 --- a/lib/DBIx/Class/Storage/DBI/mysql.pm +++ b/lib/DBIx/Class/Storage/DBI/mysql.pm @@ -11,6 +11,10 @@ sub last_insert_id { return $_[0]->_dbh->{mysql_insertid}; } +sub sqlt_type { + return 'MySQL'; +} + 1; =head1 NAME