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

Contents of /contributions/modules/og_settings/og_settings.install

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


Revision 1.1 - (show annotations) (download) (as text)
Tue Jun 3 20:33:22 2008 UTC (17 months, 3 weeks ago) by ferdi
Branch: MAIN
CVS Tags: DRUPAL-5--1-0, HEAD
Branch point for: DRUPAL-6--1
File MIME type: text/x-php
initial release
1 <?php
2 // og_settings.install
3
4 function og_settings_install() {
5 switch ($GLOBALS['db_type']) {
6 case 'mysql':
7 case 'mysqli':
8 // the {tablename} syntax is so multisite installs can add a
9 // prefix to the table name as set in the settings.php file
10 db_query("CREATE TABLE {og_settings} (
11 nid INT NOT NULL DEFAULT 0,
12 name varchar(48) NOT NULL default '',
13 value longtext NOT NULL,
14 PRIMARY KEY (nid, name)
15 ) /*!40100 DEFAULT CHARACTER SET utf8 */;");
16 break;
17
18 case 'pgsql':
19 db_query("CREATE TABLE {og_settings} (
20 nid integer NOT NULL default '0',
21 name varchar(48) NOT NULL default '',
22 value text NOT NULL default '',
23 PRIMARY KEY (nid , name)
24 )");
25 break;
26 }
27 }
28
29 function og_settings_uninstall() {
30 // Drop database table
31 db_query('DROP TABLE {og_settings}');
32 }

  ViewVC Help
Powered by ViewVC 1.1.2