projects
/
dbsrgits/DBIx-Class-Schema-Loader.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
Default db_schema to the username for DB2
[dbsrgits/DBIx-Class-Schema-Loader.git]
/
lib
/
DBIx
/
Class
/
Schema
/
Loader
/
DBI
/
DB2.pm
diff --git
a/lib/DBIx/Class/Schema/Loader/DBI/DB2.pm
b/lib/DBIx/Class/Schema/Loader/DBI/DB2.pm
index
01fbd1c
..
44c9147
100644
(file)
--- a/
lib/DBIx/Class/Schema/Loader/DBI/DB2.pm
+++ b/
lib/DBIx/Class/Schema/Loader/DBI/DB2.pm
@@
-27,6
+27,15
@@
See L<DBIx::Class::Schema::Loader::Base>.
=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) = @_;