From 029c48c68d7f4f2bc94e93e3333908ca158433c5 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Thu, 10 Sep 2009 06:38:20 +0000 Subject: - Patch #306151 by agentrickard, David_Rothstein, Dave Reid, dbabbage, moshe weitzman: automatically install/uninstall schema. --- includes/database/database.inc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'includes/database') 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); + } } /** -- cgit v1.2.3