summaryrefslogtreecommitdiff
path: root/modules/system/system.install
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2010-01-08 06:36:34 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2010-01-08 06:36:34 +0000
commit0dd161277046bab1ec994e8d756c4e99c717421e (patch)
tree5f33a4f472b6b5e10544924e5bf6cfc0348b8d08 /modules/system/system.install
parente07b9d35a1f4dcb1678c4d3bb6482daaebea6350 (diff)
downloadbrdo-0dd161277046bab1ec994e8d756c4e99c717421e.tar.gz
brdo-0dd161277046bab1ec994e8d756c4e99c717421e.tar.bz2
#629794 by yched: Fix Scaling issues with batch API. (with tests)
Diffstat (limited to 'modules/system/system.install')
-rw-r--r--modules/system/system.install56
1 files changed, 11 insertions, 45 deletions
diff --git a/modules/system/system.install b/modules/system/system.install
index add4c37c4..519cbabda 100644
--- a/modules/system/system.install
+++ b/modules/system/system.install
@@ -496,7 +496,9 @@ function system_schema() {
'fields' => array(
'bid' => array(
'description' => 'Primary Key: Unique batch ID.',
- 'type' => 'serial',
+ // This is not a serial column, to allow both progressive and
+ // non-progressive batches. See batch_process().
+ 'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
),
@@ -2257,50 +2259,7 @@ function system_update_7021() {
* Add the queue tables.
*/
function system_update_7022() {
- $schema['queue'] = array(
- 'description' => 'Stores items in queues.',
- 'fields' => array(
- 'item_id' => array(
- 'type' => 'serial',
- 'unsigned' => TRUE,
- 'not null' => TRUE,
- 'description' => 'Primary Key: Unique item ID.',
- ),
- 'name' => array(
- 'type' => 'varchar',
- 'length' => 255,
- 'not null' => TRUE,
- 'default' => '',
- 'description' => 'The queue name.',
- ),
- 'data' => array(
- 'type' => 'text',
- 'not null' => FALSE,
- 'size' => 'big',
- 'serialize' => TRUE,
- 'description' => 'The arbitrary data for the item.',
- ),
- 'expire' => array(
- 'type' => 'int',
- 'not null' => TRUE,
- 'default' => 0,
- 'description' => 'Timestamp when the claim lease expires on the item.',
- ),
- 'created' => array(
- 'type' => 'int',
- 'not null' => TRUE,
- 'default' => 0,
- 'description' => 'Timestamp when the item was created.',
- ),
- ),
- 'primary key' => array('item_id'),
- 'indexes' => array(
- 'name_created' => array('name', 'created'),
- 'expire' => array('expire'),
- ),
- );
-
- db_create_table('queue', $schema['queue']);
+ // Moved to update_fix_d7_requirements().
}
/**
@@ -2728,6 +2687,13 @@ function system_update_7049() {
}
/**
+ * Change {batch}.id column from serial to regular int.
+ */
+function system_update_7050() {
+ db_change_field('batch', 'bid', 'bid', array('description' => 'Primary Key: Unique batch ID.', 'type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE));
+}
+
+/**
* @} End of "defgroup updates-6.x-to-7.x"
* The next series of updates should start at 8000.
*/