summaryrefslogtreecommitdiff
path: root/modules/poll/poll.install
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2006-08-04 06:58:44 +0000
committerDries Buytaert <dries@buytaert.net>2006-08-04 06:58:44 +0000
commita7f67e01de1626b8cba850c325ccf12806d312c0 (patch)
treee19edd4cfc4bf7e89cd824c6f81a84ae3c700191 /modules/poll/poll.install
parent3ffb612aeae073ba00c34181f8255e2702306d0a (diff)
downloadbrdo-a7f67e01de1626b8cba850c325ccf12806d312c0.tar.gz
brdo-a7f67e01de1626b8cba850c325ccf12806d312c0.tar.bz2
- Patch #76681 by sammys: PostgreSQL support for install system. Woot! :)
Diffstat (limited to 'modules/poll/poll.install')
-rw-r--r--modules/poll/poll.install28
1 files changed, 28 insertions, 0 deletions
diff --git a/modules/poll/poll.install b/modules/poll/poll.install
index 8c8feaef8..f05958cca 100644
--- a/modules/poll/poll.install
+++ b/modules/poll/poll.install
@@ -31,5 +31,33 @@ function poll_install() {
PRIMARY KEY (chid),
KEY nid (nid)
) /*!40100 DEFAULT CHARACTER SET UTF8 */ ");
+ case 'pgsql':
+ db_query("CREATE TABLE {poll} (
+ nid uint NOT NULL default '0',
+ runtime int NOT NULL default '0',
+ active uint NOT NULL default '0',
+ PRIMARY KEY (nid)
+ )");
+
+ db_query("CREATE TABLE {poll_votes} (
+ nid uint NOT NULL,
+ uid uint NOT NULL default 0,
+ chorder int NOT NULL default -1,
+ hostname varchar(128) NOT NULL default ''
+ )");
+ db_query("CREATE INDEX {poll_votes}_nid_idx ON {poll_votes} (nid)");
+ db_query("CREATE INDEX {poll_votes}_uid_idx ON {poll_votes} (uid)");
+ db_query("CREATE INDEX {poll_votes}_hostname_idx ON {poll_votes} (hostname)");
+
+ db_query("CREATE TABLE {poll_choices} (
+ chid serial CHECK (chid >= 0),
+ nid uint NOT NULL default '0',
+ chtext varchar(128) NOT NULL default '',
+ chvotes int NOT NULL default '0',
+ chorder int NOT NULL default '0',
+ PRIMARY KEY (chid)
+ )");
+ db_query("CREATE INDEX {poll_choices}_nid_idx ON {poll_choices} (nid)");
+ break;
}
}