/[drupal]/contributions/modules/userreview/userreview.install
ViewVC logotype

Contents of /contributions/modules/userreview/userreview.install

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.3 - (show annotations) (download) (as text)
Wed May 3 09:31:59 2006 UTC (3 years, 6 months ago) by dado
Branch: MAIN
CVS Tags: DRUPAL-5--0-1, HEAD
Branch point for: DRUPAL-5, DRUPAL-4-7
Changes since 1.2: +3 -0 lines
File MIME type: text/x-php
updated to work with latest changes to votingapi module.
Please be sure to also update to the latest release of votingapi.
Also changed the tagging to (a) comply better with votingapi standards and
and (b) better identify userreview votes as coming from userreview, permitting
overlapping voting systems.
1 <?php
2
3 /* $Id$ */
4
5 function userreview_install() {
6 drupal_set_message('Installing userreview');
7 switch ($GLOBALS['db_type']) {
8 case 'mysql':
9 db_query("
10 CREATE TABLE {userreview} (
11 nid int(10) unsigned NOT NULL default '0',
12 content_type varchar(20) default NULL,
13 content_id int(10) unsigned default NULL,
14 vote_id int(10) unsigned default NULL,
15 vote_value float(10) default NULL,
16 vote_tag varchar(128) default NULL,
17 uid int(10) unsigned default NULL,
18 review_text text default NULL,
19 PRIMARY KEY (nid),
20 INDEX content_id (content_id),
21 INDEX vote_id (vote_id),
22 INDEX uid (uid)
23 ) /*!40100 DEFAULT CHARACTER SET utf8 */;");
24 break;
25 case 'mysqli':
26 db_query("
27 CREATE TABLE {userreview} (
28 nid int(10) unsigned NOT NULL default '0',
29 content_type varchar(20) default NULL,
30 content_id int(10) unsigned default NULL,
31 vote_id int(10) unsigned default NULL,
32 vote_value float(10) default NULL,
33 vote_tag varchar(128) default NULL,
34 uid int(10) unsigned default NULL,
35 review_text text default NULL,
36 PRIMARY KEY (nid),
37 INDEX content_id (content_id),
38 INDEX vote_id (vote_id),
39 INDEX uid (uid)
40 ) /*!40100 DEFAULT CHARACTER SET utf8 */;");
41 break;
42 }
43 }
44 ?>

  ViewVC Help
Powered by ViewVC 1.1.2