Revision history for Perl extension DBIx::Class::Schema::Loader
+0.01004 Tue Feb 7 03:58:01 UTC 2006
+ - No longer tries to parse out the table name from the dsn for mysql,
+ was unneccesary vestigial code from previous method.
+
0.01003 Mon Feb 6 14:57:56 UTC 2006
- Fixed the has_many side of _make_cond_rel
---
name: DBIx-Class-Schema-Loader
-version: 0.01002
+version: 0.01004
author:
- 'Brandon Black, C<blblack@gmail.com>'
abstract: Dynamic definition of a DBIx::Class::Schema
provides:
DBIx::Class::Schema::Loader:
file: lib/DBIx/Class/Schema/Loader.pm
- version: 0.01003
+ version: 0.01004
DBIx::Class::Schema::Loader::DB2:
file: lib/DBIx/Class/Schema/Loader/DB2.pm
DBIx::Class::Schema::Loader::Generic:
# Always remember to do all digits for the version even if they're 0
# i.e. first release of 0.XX *must* be 0.XX000. This avoids fBSD ports
# brain damage and presumably various other packaging systems too
-our $VERSION = '0.01003';
+our $VERSION = '0.01004';
__PACKAGE__->mk_classaccessor('loader');
my $self = shift;
my @tables = $self->tables;
my $dbh = $self->schema->storage->dbh;
- my $dsn = $self->dsn;
- my %conn =
- $dsn =~ m/\Adbi:\w+(?:\(.*?\))?:(.+)\z/i
- && index( $1, '=' ) >= 0
- ? split( /[=;]/, $1 )
- : ( database => $1 );
- my $dbname = $conn{database} || $conn{dbname} || $conn{db};
- die("Can't figure out the table name automatically.") if !$dbname;
my $quoter = $dbh->get_info(29) || q{`};
foreach my $table (@tables) {
- my $query = "SHOW CREATE TABLE ${dbname}.${table}";
+ my $query = "SHOW CREATE TABLE ${table}";
my $sth = $dbh->prepare($query)
or die("Cannot get table definition: $table");
$sth->execute;