2013062700-1.9.0_dev-add_db_queue-e6af82afc6d3eee3.php 552 B

12345678910111213141516171819202122232425
  1. <?php
  2. /**
  3. * Elgg 1.9.0-dev upgrade 2013062700
  4. * add_db_queue
  5. *
  6. * Creates the table for queue support
  7. */
  8. $db_prefix = elgg_get_config('dbprefix');
  9. // create queue table
  10. $query = <<<SQL
  11. CREATE TABLE IF NOT EXISTS `{$db_prefix}queue` (
  12. `id` int(11) NOT NULL AUTO_INCREMENT,
  13. `name` varchar(255) NOT NULL,
  14. `data` mediumblob NOT NULL,
  15. `timestamp` int(11) NOT NULL,
  16. `worker` varchar(32) NULL,
  17. PRIMARY KEY (`id`),
  18. KEY `name` (`name`),
  19. KEY `retrieve` (`timestamp`,`worker`)
  20. ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
  21. SQL;
  22. update_data($query);