[Bast-commits] r7830 - in DBIx-Class/0.08/trunk:
lib/DBIx/Class/Storage/DBI t/storage
caelum at dev.catalyst.perl.org
caelum at dev.catalyst.perl.org
Sat Oct 31 20:04:39 GMT 2009
Author: caelum
Date: 2009-10-31 20:04:39 +0000 (Sat, 31 Oct 2009)
New Revision: 7830
Modified:
DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/SQLite.pm
DBIx-Class/0.08/trunk/t/storage/replication.t
Log:
pass sqlite_version to SQLT
Modified: DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/SQLite.pm
===================================================================
--- DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/SQLite.pm 2009-10-31 13:12:36 UTC (rev 7829)
+++ DBIx-Class/0.08/trunk/lib/DBIx/Class/Storage/DBI/SQLite.pm 2009-10-31 20:04:39 UTC (rev 7830)
@@ -47,6 +47,22 @@
return $backupfile;
}
+sub deployment_statements {
+ my $self = shift;;
+ my ($schema, $type, $version, $dir, $sqltargs, @rest) = @_;
+
+ $sqltargs ||= {};
+
+ my $sqlite_version = $self->_get_dbh->{sqlite_version};
+
+ # numify, SQLT does a numeric comparison
+ $sqlite_version =~ s/^(\d+) \. (\d+) (?: \. (\d+)) .*/${1}.${2}/x;
+
+ $sqltargs->{producer_args}{sqlite_version} = $sqlite_version;
+
+ $self->next::method($schema, $type, $version, $dir, $sqltargs, @rest);
+}
+
sub datetime_parser_type { return "DateTime::Format::SQLite"; }
1;
Modified: DBIx-Class/0.08/trunk/t/storage/replication.t
===================================================================
--- DBIx-Class/0.08/trunk/t/storage/replication.t 2009-10-31 13:12:36 UTC (rev 7829)
+++ DBIx-Class/0.08/trunk/t/storage/replication.t 2009-10-31 20:04:39 UTC (rev 7830)
@@ -66,7 +66,7 @@
sub init_schema {
# current SQLT SQLite producer does not handle DROP TABLE IF EXISTS, trap warnings here
- local $SIG{__WARN__} = sub { warn @_ unless $_[0] =~ /no such table.+DROP TABLE/ };
+ local $SIG{__WARN__} = sub { warn @_ unless $_[0] =~ /no such table.+DROP TABLE/s };
my ($class, $schema_method) = @_;
More information about the Bast-commits
mailing list