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

Contents of /contributions/modules/contemplate/contemplate.install

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


Revision 1.5 - (show annotations) (download) (as text)
Sun Jan 7 01:40:26 2007 UTC (2 years, 10 months ago) by webchick
Branch: MAIN
CVS Tags: HEAD
Branch point for: DRUPAL-6--1
Changes since 1.4: +8 -5 lines
File MIME type: text/x-php
Fixing update_1
1 <?php
2 // $Id: contemplate.install,v 1.4.2.1 2007/01/07 01:39:41 webchick Exp $
3
4 function contemplate_install(){
5 switch ($GLOBALS['db_type']) {
6 case 'mysql':
7 case 'mysqli':
8 db_query("CREATE TABLE {contemplate} (
9 `type` varchar(32) NOT NULL default '',
10 teaser text NOT NULL,
11 body text NOT NULL,
12 rss text NOT NULL,
13 enclosure varchar(128) NOT NULL,
14 flags int(8) unsigned NOT NULL default '0',
15 PRIMARY KEY (`type`)
16 ) /*!40100 DEFAULT CHARACTER SET utf8 */;");
17
18 db_query("UPDATE {system} SET weight = 10 WHERE name = 'contemplate'");
19 break;
20 }
21 drupal_set_message(t('Database tables for ConTemplate module have been installed.'));
22 }
23
24 function contemplate_update_1(){
25 $ret = array();
26
27 switch ($GLOBALS['db_type']) {
28 case 'mysql':
29 case 'mysqli':
30 $ret[] = update_sql('ALTER TABLE {contemplate} ADD rss text NOT NULL');
31 $ret[] = update_sql('ALTER TABLE {contemplate} ADD enclosure varchar(128) NOT NULL');
32 $ret[] = update_sql("ALTER TABLE {contemplate} ADD flags int(8) unsigned NOT NULL default '7'");
33 break;
34 }
35
36 return $ret;
37 }

  ViewVC Help
Powered by ViewVC 1.1.2