Sfoglia il codice sorgente

Renamed queue.sql to mysql.sql to distiquish the names. Added postgresql.sql from Denis Baklikov (ZF-7573)

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@17639 44c647ce-9c0f-0410-b52a-842ac1e357ba
danlo 16 anni fa
parent
commit
8816eecc50

+ 0 - 0
library/Zend/Queue/Adapter/Db/queue.sql → library/Zend/Queue/Adapter/Db/mysql.sql


+ 49 - 0
library/Zend/Queue/Adapter/Db/postgresql.sql

@@ -0,0 +1,49 @@
+/*
+Sample grant for PostgreSQL
+
+CREATE ROLE queue LOGIN
+  PASSWORD '[CHANGE ME]'
+  NOSUPERUSER NOINHERIT NOCREATEDB NOCREATEROLE;
+
+*/
+
+--
+-- Table structure for table `queue`
+--
+
+DROP TABLE IF EXISTS queue;
+
+CREATE TABLE queue
+(
+  queue_id serial NOT NULL,
+  queue_name character varying(100) NOT NULL,
+  timeout smallint NOT NULL DEFAULT 30,
+  CONSTRAINT queue_pk PRIMARY KEY (queue_id)
+)
+WITH (OIDS=FALSE);
+ALTER TABLE queue OWNER TO queue;
+
+
+-- --------------------------------------------------------
+--
+-- Table structure for table `message`
+--
+
+DROP TABLE IF EXISTS message;
+
+CREATE TABLE message
+(
+  message_id bigserial NOT NULL,
+  queue_id integer,
+  handle character(32),
+  body character varying(8192) NOT NULL,
+  md5 character(32) NOT NULL,
+  timeout real,
+  created integer,
+  CONSTRAINT message_pk PRIMARY KEY (message_id),
+  CONSTRAINT message_ibfk_1 FOREIGN KEY (queue_id)
+      REFERENCES queue (queue_id) MATCH SIMPLE
+      ON UPDATE CASCADE ON DELETE CASCADE
+)
+WITH (OIDS=FALSE);
+ALTER TABLE message OWNER TO queue;