diff options
Diffstat (limited to 'includes')
-rw-r--r-- | includes/database/database.inc | 4 | ||||
-rw-r--r-- | includes/update.inc | 92 |
2 files changed, 48 insertions, 48 deletions
diff --git a/includes/database/database.inc b/includes/database/database.inc index bf8f0b549..287847d99 100644 --- a/includes/database/database.inc +++ b/includes/database/database.inc @@ -2477,9 +2477,7 @@ function db_next_id($existing_id = 0) { * A Schema API table definition array. */ function db_create_table($name, $table) { - if (!db_table_exists($name)) { - return Database::getConnection()->schema()->createTable($name, $table); - } + return Database::getConnection()->schema()->createTable($name, $table); } /** diff --git a/includes/update.inc b/includes/update.inc index 8157eeabe..3574f2d94 100644 --- a/includes/update.inc +++ b/includes/update.inc @@ -106,53 +106,55 @@ function update_prepare_d7_bootstrap() { // The new cache_bootstrap bin is required to bootstrap to // DRUPAL_BOOTSTRAP_SESSION, so create it here rather than in // update_fix_d7_requirements(). - $cache_bootstrap = array( - 'description' => 'Cache table for data required to bootstrap Drupal, may be routed to a shared memory cache.', - 'fields' => array( - 'cid' => array( - 'description' => 'Primary Key: Unique cache ID.', - 'type' => 'varchar', - 'length' => 255, - 'not null' => TRUE, - 'default' => '', - ), - 'data' => array( - 'description' => 'A collection of data to cache.', - 'type' => 'blob', - 'not null' => FALSE, - 'size' => 'big', - ), - 'expire' => array( - 'description' => 'A Unix timestamp indicating when the cache entry should expire, or 0 for never.', - 'type' => 'int', - 'not null' => TRUE, - 'default' => 0, - ), - 'created' => array( - 'description' => 'A Unix timestamp indicating when the cache entry was created.', - 'type' => 'int', - 'not null' => TRUE, - 'default' => 0, - ), - 'headers' => array( - 'description' => 'Any custom HTTP headers to be added to cached data.', - 'type' => 'text', - 'not null' => FALSE, + if (!db_table_exists('cache_bootstrap')) { + $cache_bootstrap = array( + 'description' => 'Cache table for data required to bootstrap Drupal, may be routed to a shared memory cache.', + 'fields' => array( + 'cid' => array( + 'description' => 'Primary Key: Unique cache ID.', + 'type' => 'varchar', + 'length' => 255, + 'not null' => TRUE, + 'default' => '', + ), + 'data' => array( + 'description' => 'A collection of data to cache.', + 'type' => 'blob', + 'not null' => FALSE, + 'size' => 'big', + ), + 'expire' => array( + 'description' => 'A Unix timestamp indicating when the cache entry should expire, or 0 for never.', + 'type' => 'int', + 'not null' => TRUE, + 'default' => 0, + ), + 'created' => array( + 'description' => 'A Unix timestamp indicating when the cache entry was created.', + 'type' => 'int', + 'not null' => TRUE, + 'default' => 0, + ), + 'headers' => array( + 'description' => 'Any custom HTTP headers to be added to cached data.', + 'type' => 'text', + 'not null' => FALSE, + ), + 'serialized' => array( + 'description' => 'A flag to indicate whether content is serialized (1) or not (0).', + 'type' => 'int', + 'size' => 'small', + 'not null' => TRUE, + 'default' => 0, + ), ), - 'serialized' => array( - 'description' => 'A flag to indicate whether content is serialized (1) or not (0).', - 'type' => 'int', - 'size' => 'small', - 'not null' => TRUE, - 'default' => 0, + 'indexes' => array( + 'expire' => array('expire'), ), - ), - 'indexes' => array( - 'expire' => array('expire'), - ), - 'primary key' => array('cid'), - ); - db_create_table('cache_bootstrap', $cache_bootstrap); + 'primary key' => array('cid'), + ); + db_create_table('cache_bootstrap', $cache_bootstrap); + } } /** |