function update_create_batch_table
Create the batch table.
This is part of the Drupal 5.x to 6.x migration.
Archivo
- drupal-6.x/
update.php, line 403 - Administrative page for handling updates from one Drupal version to another.
Código
function update_create_batch_table() {
// If batch table exists, update is not necessary
if (db_table_exists('batch')) {
return;
}
$schema['batch'] = array(
'fields' => array(
'bid' => array(
'type' => 'serial',
'unsigned' => TRUE,
'not null' => TRUE,
),
'token' => array(
'type' => 'varchar',
'length' => 64,
'not null' => TRUE,
),
'timestamp' => array(
'type' => 'int',
'not null' => TRUE,
),
'batch' => array(
'type' => 'text',
'not null' => FALSE,
'size' => 'big',
),
),
'primary key' => array('bid'),
'indexes' => array('token' => array('token')),
);
$ret = array();
db_create_table($ret, 'batch', $schema['batch']);
return $ret;
}