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

Diff of /contributions/modules/search_keywords/search_keywords.install

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

revision 1.3, Tue Jul 25 15:29:30 2006 UTC revision 1.4, Thu Feb 8 03:17:03 2007 UTC
# Line 3  function search_keywords_install() { Line 3  function search_keywords_install() {
3    switch ($GLOBALS['db_type']) {    switch ($GLOBALS['db_type']) {
4      case 'mysql':      case 'mysql':
5      case 'mysqli':      case 'mysqli':
6        db_query("CREATE TABLE search_keywords_log (        db_query("CREATE TABLE {search_keywords_log} (
7                  aid int(10) NOT NULL auto_increment,                  aid int(10) NOT NULL auto_increment,
8                  title varchar(255) default NULL,                  title varchar(255) default NULL,
9                  path varchar(255) default NULL,                  path varchar(255) default NULL,
# Line 18  function search_keywords_install() { Line 18  function search_keywords_install() {
18                /*!40100 DEFAULT CHARACTER SET utf8 */ ;");                /*!40100 DEFAULT CHARACTER SET utf8 */ ;");
19        break;        break;
20      case 'pgsql':      case 'pgsql':
21        db_query("CREATE SEQUENCE search_keywords_log_aid_seq;");        db_query("CREATE SEQUENCE {search_keywords_log_aid_seq};");
22        db_query("CREATE TABLE search_keywords_log (        db_query("CREATE TABLE {search_keywords_log} (
23                  aid integer NOT NULL DEFAULT nextval( 'search_keywords_log_aid_seq' ),                  aid integer NOT NULL DEFAULT nextval( 'search_keywords_log_aid_seq' ),
24                  title varchar(255) default NULL,                  title varchar(255) default NULL,
25                  path varchar(255) default NULL,                  path varchar(255) default NULL,
# Line 30  function search_keywords_install() { Line 30  function search_keywords_install() {
30                  timestamp integer NOT NULL default '0',                  timestamp integer NOT NULL default '0',
31                  PRIMARY KEY (aid)                  PRIMARY KEY (aid)
32                )");                )");
33        db_query("CREATE INDEX search_keywords_log_timestamp_idx ON search_keywords_log (timestamp);");        db_query("CREATE INDEX {search_keywords_log_timestamp_idx} ON search_keywords_log (timestamp);");
34        break;        break;
35    }    }
36  }  }
37    
38    function search_keywords_uninstall() {
39      db_query("DROP TABLE {search_keywords_log}");
40    }
41  ?>  ?>

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

  ViewVC Help
Powered by ViewVC 1.1.2