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

Contents of /contributions/modules/conference/conference.install

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


Revision 1.2 - (show annotations) (download) (as text)
Wed Feb 21 13:09:42 2007 UTC (2 years, 9 months ago) by hoelterhof
Branch: MAIN
CVS Tags: DRUPAL-4-7--1-1, DRUPAL-4-7--1-2, HEAD
Branch point for: DRUPAL-5
Changes since 1.1: +18 -0 lines
File MIME type: text/x-php
learning cvs, session 2
1 <?php
2
3 function conference_install() {
4 switch ($GLOBALS['db_type']) {
5 case 'mysql':
6 case 'mysqli':
7 db_query("CREATE TABLE {conference} (
8 pnid int(10) NOT NULL default '0',
9 ruid int(10) NOT NULL default '0',
10 rnid int(10) NOT NULL default '0',
11 comment1 longtext NOT NULL,
12 comment2 longtext NOT NULL,
13 status int(11) NOT NULL default '0',
14 PRIMARY KEY (`pnid`,`ruid`)
15 ) TYPE=MyISAM /*!40100 DEFAULT CHARACTER SET utf8 */;");
16 db_query("CREATE TABLE {conference_decision} (
17 pnid int(10) NOT NULL default '0',
18 decision int(10) NOT NULL default '0',
19 feedback longtext NOT NULL,
20 PRIMARY KEY (`pnid`)
21 ) TYPE=MyISAM /* 40100 DEFAULT CHARSET SET utf8 */;");
22 break;
23 case 'pgsql':
24 drupal_set_message(t('Ups, pgsql-support not implemented!'));
25 break;
26 }
27 db_query("UPDATE {system} SET weight = 5 WHERE name = 'conference'");
28 drupal_set_message(t('conference has created the required tables.'));
29 }
30
31
32 // Create decision table
33 function conference_update_1 () {
34 db_query("CREATE TABLE {conference_decision} (
35 pnid int(10) NOT NULL default '0',
36 decision int(10) NOT NULL default '0',
37 feedback longtext NOT NULL,
38 PRIMARY KEY (`pnid`)
39 ) TYPE=MyISAM /* 40100 DEFAULT CHARSET SET utf8 */;");
40 return array();
41 }
42
43 ?>

  ViewVC Help
Powered by ViewVC 1.1.2