X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FSchema%2FLoader%2FDBI%2FSybase%2FCommon.pm;h=1994870857f8910c38010dde7bcb466ecc9c3e03;hb=4295c4b477aafd9d66d88134c38805b50adfcc9e;hp=7c66aef03c7a9d23aaccb21662e2ee629227d553;hpb=f671b6308c4f2210255b2eaa12fc47a49621d436;p=dbsrgits%2FDBIx-Class-Schema-Loader.git diff --git a/lib/DBIx/Class/Schema/Loader/DBI/Sybase/Common.pm b/lib/DBIx/Class/Schema/Loader/DBI/Sybase/Common.pm index 7c66aef..1994870 100644 --- a/lib/DBIx/Class/Schema/Loader/DBI/Sybase/Common.pm +++ b/lib/DBIx/Class/Schema/Loader/DBI/Sybase/Common.pm @@ -6,7 +6,7 @@ use base 'DBIx::Class::Schema::Loader::DBI'; use Carp::Clan qw/^DBIx::Class/; use mro 'c3'; -our $VERSION = '0.07002'; +our $VERSION = '0.07010'; =head1 NAME @@ -37,29 +37,7 @@ sub _build_db_schema { my $self = shift; my $dbh = $self->schema->storage->dbh; - local $dbh->{FetchHashKeyName} = 'NAME_lc'; - - my $test_table = "_loader_test_$$"; - - my $db_schema = 'dbo'; # default - - eval { - $dbh->do("create table $test_table (id integer)"); - my $sth = $dbh->prepare('sp_tables'); - $sth->execute; - while (my $row = $sth->fetchrow_hashref) { - next unless $row->{table_name} eq $test_table; - - $db_schema = $row->{table_owner}; - last; - } - $sth->finish; - $dbh->do("drop table $test_table"); - }; - my $exception = $@; - eval { $dbh->do("drop table $test_table") }; - carp "Could not determine db_schema, defaulting to $db_schema : $exception" - if $exception; + my ($db_schema) = $dbh->selectrow_array('select user_name()'); return $db_schema; }