/[drupal]/contributions/modules/feedapi/feedapi_item/feedapi_item.install
ViewVC logotype

Contents of /contributions/modules/feedapi/feedapi_item/feedapi_item.install

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


Revision 1.7 - (show annotations) (download) (as text)
Thu Jul 19 14:28:15 2007 UTC (2 years, 4 months ago) by aronnovak
Branch: MAIN
CVS Tags: DRUPAL-5--0-1, HEAD
Branch point for: DRUPAL-5
Changes since 1.6: +14 -1 lines
File MIME type: text/x-php
Detailed settings for item and feed nodes
(content-type, date and uid)
1 <?php
2 // $Id: feedapi_item.install,v 1.6 2007/07/18 16:36:48 aronnovak Exp $
3
4 function feedapi_item_install() {
5 switch ($GLOBALS['db_type']) {
6 case 'mysqli':
7 case 'mysql':
8 db_query("CREATE TABLE if not exists {feedapi_node_item} (
9 fiid int(10) unsigned NOT NULL auto_increment,
10 fid int(10) unsigned NOT NULL,
11 nid int(10) unsigned NOT NULL,
12 url varchar(255) NOT NULL default '',
13 timestamp int unsigned NOT NULL default '0',
14 arrived int unsigned NOT NULL default '0',
15 guid varchar(255) NOT NULL default '',
16 PRIMARY KEY(fiid, nid))");
17 db_query("CREATE TABLE if not exists {feedapi_node_item_settings} (
18 fid int(10) unsigned NOT NULL,
19 content_type varchar(255) NOT NULL default '',
20 uid int NOT NULL default '0',
21 date varchar(10) NOT NULL default 'feed',
22 PRIMARY KEY(fid));");
23 break;
24 case 'pgsql':
25 db_query("CREATE TABLE {feedapi_node_item} (
26 fiid serial,
27 fid integer not null,
28 nid integer not null,
29 url varchar(255) NOT NULL default '',
30 timestamp integer not null,
31 arrived integer not null,
32 guid varchar(255) NOT NULL default '',
33 PRIMARY KEY(fiid, nid))");
34 db_query("CREATE TABLE if not exists {feedapi_node_item_settings} (
35 fid integer not null,
36 content_type varchar(255) NOT NULL default '',
37 uid int NOT NULL default '0',
38 date varchar(10) NOT NULL default 'feed',
39 PRIMARY KEY(fid));");
40 break;
41 }
42 }
43
44 function feedapi_item_uninstall() {
45 switch ($GLOBALS['db_type']) {
46 case 'mysqli':
47 case 'mysql':
48 case 'pgsql':
49 db_query("DROP TABLE {feedapi_node_item}");
50 db_query("DROP TABLE {feedapi_node_item_settings}");
51 break;
52 }
53 }

  ViewVC Help
Powered by ViewVC 1.1.2