diff --git a/schema.inc b/schema.inc
index 37aa530..88db9d0 100644
--- a/schema.inc
+++ b/schema.inc
@@ -19,9 +19,8 @@ class DatabaseSchema_oracle extends DatabaseSchema {
 
   private $foundLongIdentifier = false;
   
-  public function oid($name, $prefix= FALSE, $quote= TRUE)
-  {
-  	  $ret= $name;
+  public function oid($name, $prefix=FALSE, $quote=TRUE) {
+  	  $ret = $name;
   	  
   	  if (strlen($ret)>ORACLE_IDENTIFIER_MAX_LENGTH)
   	  {
@@ -30,12 +29,12 @@ class DatabaseSchema_oracle extends DatabaseSchema {
   	  }
   	  
   	  if ($prefix)
-  	   $ret= "{".$ret."}";
+  	    $ret = "{" . $ret . "}";
   	  else
-  	   $ret= strtoupper($ret);
+  	    $ret = strtoupper($ret);
   	   
-  	  if (!$prefix&&$quote)
-  	   $ret= '"'.$ret.'"';
+  	  if (!$prefix && $quote)
+  	    $ret = '"' . $ret . '"';
   	  
   	  return $ret;
   }
@@ -262,35 +261,36 @@ class DatabaseSchema_oracle extends DatabaseSchema {
    *    The field specification, as per the schema data structure format.
    */
   protected function createFieldSql($name, $spec) {
-    $oname= $this->oid($name);
-  
-    $sql = $oname . ' ' . $spec['oracle_type'];
+  	$oname= $this->oid($name);
+    
+  	$sql = $oname . ' ' . $spec['oracle_type'];
 
     if ($spec['type'] == 'serial') {
       unset($spec['not null']);
     }
-  
-  
-    if ($spec['oracle_type'] == 'varchar2') {
+    
+    
+    if ($spec['oracle_type']=='varchar2')
+    {
       $sql .= '('.(!empty($spec['length']) ? $spec['length'] : ORACLE_MAX_VARCHAR2_LENGTH ).' CHAR)';
     }
-    else if ($spec['oracle_type'] == 'char') {
-      $sql .= '('.(!empty($spec['length']) ? $spec['length'] : ORACLE_MAX_CHAR_LENGTH ).' CHAR)';
+    elseif (!empty($spec['length'])) {
+      $sql .= '(' . $spec['length'] . ')';
     }
-
-    if ($spec['type'] == 'numeric' && isset($spec['precision']) && isset($spec['scale'])) {
+    elseif (isset($spec['precision']) && isset($spec['scale'])) {
       $sql .= '(' . $spec['precision'] . ', ' . $spec['scale'] . ')';
     }
 
-    if (isset($spec['default']) && $spec['type'] != 'text') {
+    if (isset($spec['default'])) {
       $default = is_string($spec['default']) ? $this->connection->quote($this->connection->cleanupArgValue($spec['default'])) : $spec['default'];
+      
       $sql .= " default $default";
     }
 
     if (isset($spec['not null']) && $spec['not null']) {
       $sql .= ' NOT NULL';
     }
-
+    
     if (!empty($spec['unsigned'])) {
       $sql .= " CHECK ($oname >= 0)";
     }
@@ -421,14 +421,11 @@ class DatabaseSchema_oracle extends DatabaseSchema {
     
   	if (isset($info->sequence_name)&&$info->sequence_name)
   	{
-  	    $statements= $this->createSerialSql($new_name,$info->field_name,$info->sequence_restart);
+  	    $statements= $this->createSerialSql($table,$info->field_name,$info->sequence_restart);
   	    
   	    foreach ($statements as $statement)
   	     db_query($statement);
   	}
-  	
-  	// Update blob_column table for new table name
-	db_query("UPDATE blob_column SET table_name = :new_table where table_name = :old_table", array( "new_table" => strtoupper($this->oid($new_name,false,false)), "old_table" => strtoupper($this->oid($table,false,false))));
     
     $this->renameIndexes($table,$new_name);
     $this->resetLongIdentifiers();
@@ -444,17 +441,40 @@ class DatabaseSchema_oracle extends DatabaseSchema {
    */
   public function dropTable($table) {
     //syslog(LOG_ERR,"dropTable($table)");
-  	$info= $this->getTableInfo($table);
+    $owner = FALSE;
+    if (strpos($table, '.') !== FALSE) {
+      list($owner, $table) = explode('.', $table, 2);
+    }
+
+    $table = $this->oid($table, FALSE, FALSE);
+
+    if (!$owner) {
+      $full_table = $this->connection->prefixTables('{' . strtoupper($table) . '}');
+    }
+    else {
+      $full_table = strtoupper('"' . $owner . '"."' . $table . '"');
+    }
+
+    if (!$this->tableExists($full_table)) {
+      return FALSE;
+    }
+
+  	$info = $this->getTableInfo($full_table);
   	
-  	if ($info->sequence_name)
-  	  db_query('DROP SEQUENCE '.$info->sequence_name);
+  	if ($info->sequence_name) {
+      db_query('DROP SEQUENCE '. $info->sequence_name);
+    }
   	
-    db_query('DROP TABLE ' . $this->oid($table,true) . ' CASCADE CONSTRAINTS PURGE');
+    db_query('DROP TABLE ' . $full_table . ' CASCADE CONSTRAINTS PURGE');
 
-    // Delete blob_column table for table name
-	db_query("DELETE from blob_column where table_name = :table", array( "table" => strtoupper($this->oid($table,false,false))));
+    if ($owner) {
+      unset(DatabaseSchema_oracle::$tableInformation[$owner . '|' . $table]);
+    }
+    else {
+      $this->removeTableInfoCache($table);
+    }
 
-    $this->removeTableInfoCache($table);
+    return TRUE;
   }
 
   /**
@@ -520,9 +540,6 @@ class DatabaseSchema_oracle extends DatabaseSchema {
   	    foreach ($statements as $statement)
   	     db_query($statement);	
     }
-    else if ($spec['type'] == 'blob') {
-		db_query("INSERT INTO BLOB_COLUMN VALUES (:tablename, :columnname)", array("tablename" => $this->oid($table,false,false), "columnname" => $this->oid($field,false,false)));
-	}
 	    
     $this->resetLongIdentifiers();
     $this->removeTableInfoCache($table);
@@ -551,9 +568,6 @@ class DatabaseSchema_oracle extends DatabaseSchema {
     try
     {	
 	    db_query('ALTER TABLE ' . $this->oid($table,true) . ' DROP COLUMN ' . $this->oid($field));
-	    // Delete blob_column table for table name
- 	    db_query("DELETE from blob_column where table_name = :tablename and column_name = :columnname", array( "tablename" => strtoupper($this->oid($table,false,false)), "columnname" => strtoupper($this->oid($field,false,false))));
-
 	    $this->resetLongIdentifiers();
 	    $this->removeTableInfoCache($table);
 	    $this->rebuildDefaultsTrigger($table);
@@ -932,7 +946,11 @@ class DatabaseSchema_oracle extends DatabaseSchema {
   
   public static function tableSchema($table)
   {
-  	$exp= explode(".",$table);
+  	$exp= explode(".", $table);
+
+    if (strpos($table, '.') !== FALSE) {
+      list($schema, ) = explode('.', $table);
+    }
   	
   	if (count($exp)>1)
   	  return strtoupper(str_replace('"','',$exp[0]));
@@ -941,7 +959,15 @@ class DatabaseSchema_oracle extends DatabaseSchema {
   }
   
   public function tableExists($table) {
-  	$schema= $this->tableSchema($this->connection->prefixTables('{' . strtoupper($table) . '}',true));
+    $table = strtoupper($table);
+    if (strpos($table, '.') !== FALSE) {
+      list($schema, $table) = explode('.', $table, 2);
+      $schema = trim($schema, '"');
+      $table = trim($table, '"');
+    }
+    else {
+      $schema = $this->tableSchema($this->connection->prefixTables('{' . $table . '}', true));
+    }
 
   	if ($schema)
   	  $retval= db_query("SELECT 1 FROM all_tables WHERE temporary= 'N' and table_name = ? and owner= ?",array($this->oid($table,false,false),$schema))->fetchField();
@@ -969,16 +995,21 @@ class DatabaseSchema_oracle extends DatabaseSchema {
   }
   
   public function findTables($table_expression) {
-//  	  syslog(LOG_ERR,"te: ".$table_expression);
-  	  $schema= $this->tableSchema($table_expression);
-  	  $table_expression= str_replace('"'.$schema.'"."','',$table_expression);
-  	  $table_expression= str_replace('"','',$table_expression);
-  //	  syslog(LOG_ERR,"te: ".$table_expression.' '.$schema);
-  	  
-      $res= db_query("SELECT '\"'||owner||'\".\"'||table_name||'\"' tab FROM all_tables WHERE owner= ? and table_name LIKE ?",array($schema,strtoupper($table_expression)))->fetchAllKeyed(0, 0);
+  	  $schema = $this->tableSchema($table_expression);
+
+  	  $table_expression = str_replace('"' . $schema . '"."', '', $table_expression);
+  	  $table_expression = strtoupper(str_replace('"', '', $table_expression));
+
+      $res= db_query("SELECT owner, table_name FROM all_tables WHERE owner LIKE ?", array($table_expression))->fetchAll();
+      $out = array();
+
+      foreach ($res as $table) {
+        $full_table = strtolower($table->owner . '.' . $table->table_name);
+        $out[$full_table] = $full_table;
+      }
   	    
   	//  syslog(LOG_ERR,"res: ".print_r($res,true));
-  	  return $res;
+  	  return $out;
   }
 
 
@@ -991,5 +1022,4 @@ class DatabaseSchema_oracle extends DatabaseSchema {
      { /* ignore */ }
   }
 
-
 }
