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

Contents of /contributions/modules/cubalaya/cubalaya.install

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


Revision 1.2 - (show annotations) (download) (as text)
Fri Jul 20 11:29:51 2007 UTC (2 years, 4 months ago) by njt1982
Branch: MAIN
CVS Tags: HEAD
Branch point for: DRUPAL-5
Changes since 1.1: +2 -2 lines
File MIME type: text/x-php
Added basic admin area + fixed click tracking.
1 <?php
2
3 /**
4 * Implementation of hook_install()
5 */
6 function cubalaya_install() {
7 switch ($GLOBALS['db_type']) {
8 case 'mysqli':
9 case 'mysql':
10 db_query("CREATE TABLE {node_cubalaya} (
11 nid int(10) unsigned NOT NULL default '0',
12 keywords varchar(255) character set utf8 NOT NULL default '',
13 link_type varchar(2) character set utf8 default 'OP',
14 thumbnail varchar(255) character set utf8 NOT NULL default '',
15 PRIMARY KEY (nid)
16 ) /*!40100 DEFAULT CHARACTER SET utf8 */;");
17
18 db_query("CREATE TABLE {cubalaya_hits} (
19 nid int(10) unsigned NOT NULL,
20 timestamp int(10) unsigned NOT NULL,
21 PRIMARY KEY (nid, timestamp)
22 ) /*!40100 DEFAULT CHARACTER SET utf8 */;");
23
24 db_query("CREATE TABLE {cubalaya_association} (
25 nid int(10) unsigned NOT NULL,
26 cubalaya_nid int(10) unsigned NOT NULL,
27 PRIMARY KEY (nid, cubalaya_nid)
28 ) /*!40100 DEFAULT CHARACTER SET utf8 */;");
29 break;
30 }
31 }

  ViewVC Help
Powered by ViewVC 1.1.2