Revert my previous changes (rev 1722 reverted back to rev 1721)
[dbsrgits/SQL-Translator.git] / lib / SQL / Translator / Parser / DBI / Oracle.pm
index b1a43c6..c853a81 100644 (file)
@@ -1,8 +1,6 @@
 package SQL::Translator::Parser::DBI::Oracle;
 
 # -------------------------------------------------------------------
-# $Id$
-# -------------------------------------------------------------------
 # Copyright (C) 2006-2009 SQLFairy Authors
 #
 # This program is free software; you can redistribute it and/or
@@ -42,7 +40,7 @@ use SQL::Translator::Schema::Table;
 use SQL::Translator::Schema::Field;
 use SQL::Translator::Schema::Constraint;
 
-our $VERSION = '1.99';
+our $VERSION = '1.59';
 
 # -------------------------------------------------------------------
 sub parse {
@@ -50,10 +48,10 @@ sub parse {
 
     my $schema = $tr->schema;
 
-    my $sth = $dbh->table_info();
+    my $db_user = uc $tr->parser_args()->{db_user};
+    my $sth = $dbh->table_info(undef, $db_user, '%', 'TABLE');
 
     while(my $table_info = $sth->fetchrow_hashref('NAME_uc')) {
-        next unless ($table_info->{TABLE_TYPE} eq 'TABLE');
         next if ($table_info->{TABLE_NAME} =~ /\$/);
 
         # create the table