web/Zend/Queue/Adapter/Db/mysql.sql
changeset 0 4eba9c11703f
equal deleted inserted replaced
-1:000000000000 0:4eba9c11703f
       
     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 
       
    10 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
       
    11 
       
    12 /*
       
    13 Sample grant for MySQL
       
    14 
       
    15 GRANT DELETE, INSERT, SELECT, UPDATE ON queue.* TO 'queue'@'127.0.0.1' IDENTIFIED BY '[CHANGE ME]';
       
    16 mysql -u queue -h 127.0.0.1 -p queue
       
    17 
       
    18 mysqlaccess queue queue --superuser=root -H 127.0.0.1
       
    19 
       
    20 
       
    21 */
       
    22 
       
    23 
       
    24 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
       
    25 /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
       
    26 /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
       
    27 /*!40101 SET NAMES utf8 */;
       
    28 
       
    29 --
       
    30 -- Database: `queue`
       
    31 --
       
    32 
       
    33 -- --------------------------------------------------------
       
    34 
       
    35 --
       
    36 -- Table structure for table `message`
       
    37 --
       
    38 
       
    39 DROP TABLE IF EXISTS `message`;
       
    40 CREATE TABLE IF NOT EXISTS `message` (
       
    41   `message_id` bigint(20) unsigned NOT NULL auto_increment,
       
    42   `queue_id` int(10) unsigned NOT NULL,
       
    43   `handle` char(32) default NULL,
       
    44   `body` varchar(8192) NOT NULL,
       
    45   `md5` char(32) NOT NULL,
       
    46   `timeout` decimal(14,4) unsigned default NULL,
       
    47   `created` int(10) unsigned NOT NULL,
       
    48   PRIMARY KEY  (`message_id`),
       
    49   UNIQUE KEY `message_handle` (`handle`),
       
    50   KEY `message_queueid` (`queue_id`)
       
    51 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
       
    52 
       
    53 -- --------------------------------------------------------
       
    54 
       
    55 --
       
    56 -- Table structure for table `queue`
       
    57 --
       
    58 
       
    59 DROP TABLE IF EXISTS `queue`;
       
    60 CREATE TABLE IF NOT EXISTS `queue` (
       
    61   `queue_id` int(10) unsigned NOT NULL auto_increment,
       
    62   `queue_name` varchar(100) NOT NULL,
       
    63   `timeout` smallint(5) unsigned NOT NULL default '30',
       
    64   PRIMARY KEY  (`queue_id`)
       
    65 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
       
    66 
       
    67 --
       
    68 -- Constraints for dumped tables
       
    69 --
       
    70 
       
    71 --
       
    72 -- Constraints for table `message`
       
    73 --
       
    74 ALTER TABLE `message`
       
    75   ADD CONSTRAINT `message_ibfk_1` FOREIGN KEY (`queue_id`) REFERENCES `queue` (`queue_id`) ON DELETE CASCADE ON UPDATE CASCADE;