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

Contents of /contributions/modules/pressflow_placement/pressflow_placement.install

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


Revision 1.1 - (show annotations) (download) (as text)
Sun Apr 1 07:29:48 2007 UTC (2 years, 7 months ago) by straussd
Branch: MAIN
CVS Tags: HEAD
Branch point for: DRUPAL-5
File MIME type: text/x-php
PressFlow Placement
1 <?php
2
3 function pressflow_placement_install()
4 {
5 switch ($GLOBALS['db_type'])
6 {
7 case 'mysql':
8 case 'mysqli':
9 db_query("CREATE TABLE `pressflow_placement` (
10 `vid` int(10) unsigned NOT NULL,
11 `nid` int(10) unsigned NOT NULL,
12 `max_nodes` int(10) unsigned NOT NULL,
13 `node_type` varchar(50) NOT NULL,
14 PRIMARY KEY (`vid`),
15 KEY `nid` (`nid`),
16 KEY `node_type` (`node_type`)
17 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
18
19 CREATE TABLE `pressflow_placement_teasers` (
20 `vid` int(10) unsigned NOT NULL,
21 `nid` int(10) unsigned NOT NULL,
22 `weight` int(10) NOT NULL,
23 `teaser_nid` int(10) unsigned NOT NULL,
24 `teaser` text NOT NULL,
25 PRIMARY KEY (`vid`,`weight`),
26 KEY `nid` (`nid`)
27 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;");
28 break;
29
30 case 'pgsql':
31 drupal_set_message('PostgreSQL is not currently supported.', 'error');
32 break;
33 }
34 }
35
36 function pressflow_placement_uninstall()
37 {
38 db_query('DROP TABLE {pressflow_placement}');
39 db_query('DROP TABLE {pressflow_placement_order}');
40 }

  ViewVC Help
Powered by ViewVC 1.1.2