function batch_install
Search API
7.x batch.install | batch_install() |
6.x batch.install | batch_install() |
5.x batch.install | batch_install() |
Implementation of hook_install.
We want to create our database table.
File
- modules/
batch/ batch.install, line 15
Code
function batch_install() {
db_query("DROP TABLE IF EXISTS `batch_queue` ");
db_query("
CREATE TABLE `batch_queue` (
`batch_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`token` varchar(64) NOT NULL COMMENT 'A string token generated against the current users session id and the batch id, used to ensure that only the user who submitted the batch can effectively access it.',
`created` int(11) unsigned NOT NULL COMMENT 'A Unix timestamp indicating when this batch was submitted for processing. Stale batches are purged at cron time.',
`batch_data` longblob COMMENT 'A serialized array containing the processing data for the batch.',
PRIMARY KEY (`batch_id`),
KEY `token` (`token`)
)
");
}