[Bast-commits] r4195 - in
branches/DBIx-Class-Schema-Loader/current: .
lib/DBIx/Class/Schema/Loader/DBI t
ilmari at dev.catalyst.perl.org
ilmari at dev.catalyst.perl.org
Thu Mar 13 20:45:37 GMT 2008
Author: ilmari
Date: 2008-03-13 20:45:37 +0000 (Thu, 13 Mar 2008)
New Revision: 4195
Modified:
branches/DBIx-Class-Schema-Loader/current/Changes
branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/DBI/DB2.pm
branches/DBIx-Class-Schema-Loader/current/t/13db2_common.t
Log:
Default db_schema to the username for DB2
Modified: branches/DBIx-Class-Schema-Loader/current/Changes
===================================================================
--- branches/DBIx-Class-Schema-Loader/current/Changes 2008-03-13 20:22:34 UTC (rev 4194)
+++ branches/DBIx-Class-Schema-Loader/current/Changes 2008-03-13 20:45:37 UTC (rev 4195)
@@ -2,6 +2,7 @@
Not yet released
- Fix limiting table list to the specified schema for DB2
+ - Default db_schema to the username for DB2
0.04999_04 Wed Mar 12, 2008
- Add is_auto_increment detecton for DB2
Modified: branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/DBI/DB2.pm
===================================================================
--- branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/DBI/DB2.pm 2008-03-13 20:22:34 UTC (rev 4194)
+++ branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/DBI/DB2.pm 2008-03-13 20:45:37 UTC (rev 4195)
@@ -27,6 +27,15 @@
=cut
+sub _setup {
+ my $self = shift;
+
+ $self->next::method(@_);
+
+ my $dbh = $self->schema->storage->dbh;
+ $self->{db_schema} ||= $dbh->selectrow_array('VALUES(CURRENT_USER)', {});
+}
+
sub _table_uniq_info {
my ($self, $table) = @_;
Modified: branches/DBIx-Class-Schema-Loader/current/t/13db2_common.t
===================================================================
--- branches/DBIx-Class-Schema-Loader/current/t/13db2_common.t 2008-03-13 20:22:34 UTC (rev 4194)
+++ branches/DBIx-Class-Schema-Loader/current/t/13db2_common.t 2008-03-13 20:45:37 UTC (rev 4195)
@@ -12,7 +12,6 @@
dsn => $dsn,
user => $user,
password => $password,
- db_schema => uc $user,
);
if( !$dsn || !$user ) {
More information about the Bast-commits
mailing list