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

Contents of /contributions/modules/notepad/notepad.install

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


Revision 1.2 - (show annotations) (download) (as text)
Mon Jun 11 19:01:46 2007 UTC (2 years, 5 months ago) by jondoesdrupal
Branch: MAIN
CVS Tags: DRUPAL-5--1-2, HEAD
Changes since 1.1: +1 -1 lines
File MIME type: text/x-php
Corrected missing comma in .install file
1 <?php
2 // $Id:$
3
4 /**
5 * Implementation of hook_install().
6 */
7 function notepad_install() {
8 switch ($GLOBALS['db_type']) {
9 case 'mysql':
10 case 'mysqli':
11 db_query("CREATE TABLE {notepad_node_metadata} (
12 vid int(10) NOT NULL default '0',
13 nid int(10) NOT NULL default '0',
14 priority tinyint(1) NOT NULL default '0',
15 personal TINYINT(1) NOT NULL DEFAULT '0',
16 PRIMARY KEY (vid),
17 KEY notepad (nid, personal)
18 ) TYPE=MyISAM;");
19 db_query("CREATE TABLE {notepad_nodes} (
20 nid int(10) NOT NULL default '0',
21 node_id int(10) NOT NULL default '0',
22 node_type varchar(32) NOT NULL,
23 uid int(11) NOT NULL DEFAULT '0',
24 KEY notepad_nodes (nid, node_id, uid)
25 ) TYPE=MyISAM;");
26 break;
27 }
28 }
29
30 /**
31 * Implementation of hook_uninstall().
32 */
33 function notepad_uninstall() {
34 db_query('DROP TABLE {notepad_node_metadata}');
35 db_query('DROP TABLE {notepad_nodes}');
36 variable_del('number_of_notes_to_show', 10);
37 }

  ViewVC Help
Powered by ViewVC 1.1.2