/[drupal]/contributions/themes/flatforum/flatforum.install
ViewVC logotype

Contents of /contributions/themes/flatforum/flatforum.install

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


Revision 1.2 - (show annotations) (download) (as text)
Mon Nov 27 18:31:15 2006 UTC (3 years ago) by ayman
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +12 -0 lines
File MIME type: text/x-php
PostgreSQL compatibility by Paul Munn. This closes issue #98531.
1 <?php
2
3 function flatforum_update_1() {
4 return _system_update_utf8(array('flatforum'));
5 }
6
7 function flatforum_install() {
8 switch ($GLOBALS['db_type']) {
9 case 'mysql':
10 case 'mysqli':
11 db_query(
12 <<<MYSQL_UPDATE
13 CREATE TABLE {flatforum} (
14 uid int(10) unsigned NOT NULL default '0',
15 posts int(10) unsigned NOT NULL default '0',
16 PRIMARY KEY (uid)
17 ) TYPE=MyISAM /*!40100 DEFAULT CHARACTER SET utf8 */;
18 MYSQL_UPDATE
19 );
20 break;
21
22 case 'pgsql':
23 db_query(
24 <<<PGSQL_UPDATE
25 CREATE TABLE {flatforum} (
26 uid integer NOT NULL default 0 CHECK(uid > 0),
27 posts integer NOT NULL default 0 CHECK(posts > 0),
28 PRIMARY KEY (uid)
29 );
30 PGSQL_UPDATE
31 );
32 break;
33 }
34 }
35

  ViewVC Help
Powered by ViewVC 1.1.2