summaryrefslogtreecommitdiff
path: root/includes/database
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2009-09-10 06:38:20 +0000
committerDries Buytaert <dries@buytaert.net>2009-09-10 06:38:20 +0000
commit029c48c68d7f4f2bc94e93e3333908ca158433c5 (patch)
treebf1fef18db8910f94ee977861829b966d42efb00 /includes/database
parent82b51dff1d2fd90b439129c70b415d30a06d1bce (diff)
downloadbrdo-029c48c68d7f4f2bc94e93e3333908ca158433c5.tar.gz
brdo-029c48c68d7f4f2bc94e93e3333908ca158433c5.tar.bz2
- Patch #306151 by agentrickard, David_Rothstein, Dave Reid, dbabbage, moshe weitzman: automatically install/uninstall schema.
Diffstat (limited to 'includes/database')
-rw-r--r--includes/database/database.inc4
1 files changed, 3 insertions, 1 deletions
diff --git a/includes/database/database.inc b/includes/database/database.inc
index 22bd8fe2e..f298376ff 100644
--- a/includes/database/database.inc
+++ b/includes/database/database.inc
@@ -2130,7 +2130,9 @@ function db_close(array $options = array()) {
* A Schema API table definition array.
*/
function db_create_table(&$ret, $name, $table) {
- return Database::getConnection()->schema()->createTable($ret, $name, $table);
+ if (!db_table_exists($name)) {
+ return Database::getConnection()->schema()->createTable($ret, $name, $table);
+ }
}
/**