From 7863e733f678dd0ad29c7cdda29e8d4948f60d18 Mon Sep 17 00:00:00 2001 From: David Goodwin Date: Sun, 23 Sep 2007 17:52:35 +0000 Subject: [PATCH] move database stuff back into ../DATABASE_[MYSQL|PGSQL].txt git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@80 a1433add-5e2c-0410-b055-b7f2511e0802 --- VIRTUAL_VACATION/DATABASE.txt | 69 ----------------------------------- VIRTUAL_VACATION/INSTALL.TXT | 2 +- 2 files changed, 1 insertion(+), 70 deletions(-) delete mode 100644 VIRTUAL_VACATION/DATABASE.txt diff --git a/VIRTUAL_VACATION/DATABASE.txt b/VIRTUAL_VACATION/DATABASE.txt deleted file mode 100644 index 4b2e4865..00000000 --- a/VIRTUAL_VACATION/DATABASE.txt +++ /dev/null @@ -1,69 +0,0 @@ -PostgreSQL -========== - -Issue the following commands to setup the appropriate table structure. - -$ createuser -P vacation - -Schema follows : - -DROP TABLE vacation,vacation_notification CASCADE; - -CREATE TABLE vacation ( - email character varying(255) PRIMARY KEY, - subject character varying(255) NOT NULL DEFAULT '', - body text NOT NULL DEFAULT '', - cache text NOT NULL DEFAULT '', - "domain" character varying(255) NOT NULL REFERENCES "domain", - created timestamp with time zone DEFAULT now(), - active boolean DEFAULT true NOT NULL -); -CREATE INDEX vacation_email_active ON vacation(email,active); - -CREATE TABLE vacation_notification ( - on_vacation character varying(255) NOT NULL REFERENCES vacation(email) ON DELETE CASCADE, - notified character varying(255) NOT NULL, - notified_at timestamp with time zone NOT NULL DEFAULT now(), - CONSTRAINT vacation_notification_pkey primary key(on_vacation,notified) -); --- Note: It's important the the primary key constraint on vacation_notification --- be given a name which includes the '_pkey' substring (default PostgreSQL naming --- for primary keys). The vacation-script looks for this substring to --- distinguish between an acceptable and non-acceptable error. - - -GRANT - SELECT,INSERT,UPDATE,DELETE -ON - vacation -TO postfixadmin; - -GRANT SELECT ON vacation TO vacation; -GRANT SELECT,INSERT,DELETE ON vacation_notification TO vacation; - - -MySQL -===== - - -CREATE TABLE vacation ( - email varchar(255) NOT NULL default '', - subject varchar(255) NOT NULL default '', - body text NOT NULL, - cache text NOT NULL, - domain varchar(255) NOT NULL default '', - created datetime NOT NULL default '0000-00-00 00:00:00', - active tinyint(4) NOT NULL default '1', - PRIMARY KEY (email), - KEY email (email) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci TYPE=InnoDB COMMENT='Postfix Admin - Virtual Vacation' ; - -# vacation_notification table - -CREATE TABLE vacation_notification ( - on_vacation varchar(255) NOT NULL, - notified varchar(255) NOT NULL, - notified_at timestamp NOT NULL default now(), - CONSTRAINT vacation_notification_pkey PRIMARY KEY(on_vacation, notified), - FOREIGN KEY (on_vacation) REFERENCES vacation(email) ON DELETE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci TYPE=InnoDB COMMENT='Postfix Admin - Virtual Vacation Notifications'; diff --git a/VIRTUAL_VACATION/INSTALL.TXT b/VIRTUAL_VACATION/INSTALL.TXT index 0f5ff0fc..e9b1af65 100644 --- a/VIRTUAL_VACATION/INSTALL.TXT +++ b/VIRTUAL_VACATION/INSTALL.TXT @@ -98,7 +98,7 @@ Execute "postfix reload" to complete the change. 5. Create the table ------------------- -See DATABASE.txt in this directory. +See ../DATABASE_*.txt in this directory. 6. Edit filter.pl -----------------