summaryrefslogtreecommitdiffstats
path: root/lib/private/db
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/db')
-rw-r--r--lib/private/db/connection.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/private/db/connection.php b/lib/private/db/connection.php
index e2d90c8fc82..9de7a719ff5 100644
--- a/lib/private/db/connection.php
+++ b/lib/private/db/connection.php
@@ -177,6 +177,18 @@ class Connection extends \Doctrine\DBAL\Connection implements IDBConnection {
}
}
+ /**
+ * Check if a table exists
+ *
+ * @param string $table table name without the prefix
+ * @return bool
+ */
+ public function tableExists($table){
+ $table = $this->tablePrefix . trim($table);
+ $schema = $this->getSchemaManager();
+ return $schema->tablesExist(array($table));
+ }
+
// internal use
/**
* @param string $statement