2
0

mysql.sql 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. -- phpMyAdmin SQL Dump
  2. -- version 2.11.6
  3. -- http://www.phpmyadmin.net
  4. --
  5. -- Host: localhost:3306
  6. -- Generation Time: Jun 19, 2008 at 08:09 PM
  7. -- Server version: 5.0.51
  8. -- PHP Version: 5.2.3
  9. SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
  10. /*
  11. Sample grant for MySQL
  12. GRANT DELETE, INSERT, SELECT, UPDATE ON queue.* TO 'queue'@'127.0.0.1' IDENTIFIED BY '[CHANGE ME]';
  13. mysql -u queue -h 127.0.0.1 -p queue
  14. mysqlaccess queue queue --superuser=root -H 127.0.0.1
  15. */
  16. /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
  17. /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
  18. /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
  19. /*!40101 SET NAMES utf8 */;
  20. --
  21. -- Database: `queue`
  22. --
  23. -- --------------------------------------------------------
  24. --
  25. -- Table structure for table `message`
  26. --
  27. DROP TABLE IF EXISTS `message`;
  28. CREATE TABLE IF NOT EXISTS `message` (
  29. `message_id` bigint(20) unsigned NOT NULL auto_increment,
  30. `queue_id` int(10) unsigned NOT NULL,
  31. `handle` char(32) default NULL,
  32. `body` varchar(8192) NOT NULL,
  33. `md5` char(32) NOT NULL,
  34. `timeout` decimal(14,4) unsigned default NULL,
  35. `created` int(10) unsigned NOT NULL,
  36. PRIMARY KEY (`message_id`),
  37. UNIQUE KEY `message_handle` (`handle`),
  38. KEY `message_queueid` (`queue_id`)
  39. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  40. -- --------------------------------------------------------
  41. --
  42. -- Table structure for table `queue`
  43. --
  44. DROP TABLE IF EXISTS `queue`;
  45. CREATE TABLE IF NOT EXISTS `queue` (
  46. `queue_id` int(10) unsigned NOT NULL auto_increment,
  47. `queue_name` varchar(100) NOT NULL,
  48. `timeout` smallint(5) unsigned NOT NULL default '30',
  49. PRIMARY KEY (`queue_id`)
  50. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  51. --
  52. -- Constraints for dumped tables
  53. --
  54. --
  55. -- Constraints for table `message`
  56. --
  57. ALTER TABLE `message`
  58. ADD CONSTRAINT `message_ibfk_1` FOREIGN KEY (`queue_id`) REFERENCES `queue` (`queue_id`) ON DELETE CASCADE ON UPDATE CASCADE;