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

Diff of /contributions/modules/zeitgeist/zeitgeist.install

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

revision 1.1.6.3, Sun Oct 14 16:52:53 2007 UTC revision 1.1.6.4, Thu Aug 7 19:55:06 2008 UTC
# Line 4  Line 4 
4   *   *
5   * @copyright (c) 2006-2007 FG Marand.   * @copyright (c) 2006-2007 FG Marand.
6   * @license Licensed under the CeCILL 2.0 license.   * @license Licensed under the CeCILL 2.0 license.
  * @version $Id: zeitgeist.install,v 1.1.6.2 2007/08/27 21:13:04 fgm Exp $  
7   * @since Drupal 4.7   * @since Drupal 4.7
8   */   */
9    
10    // $Id: zeitgeist.install,v 1.1.6.3 2007/10/14 16:52:53 fgm Exp $
11    
12  /**  /**
13   * Define the structure of the non-core tables used by Zeitgeist.   * Define the structure of the non-core tables used by Zeitgeist.
14   * This used to live in zeitgeist.schema until some point in the D6 beta process   * This used to live in zeitgeist.schema until some point in the D6 beta process
# Line 21  function zeitgeist_schema() Line 22  function zeitgeist_schema()
22      (      (
23      'fields' => array      'fields' => array
24        (        (
25        'search'    => array('type' => 'varchar', 'length' => 80, 'not null' => true, 'default' => ''),        'search'      => array
26        'category'  => array('type' => 'varchar', 'length' => 64, 'not null' => true, 'default' => 'node'),          (
27        'ts'        => array('type' => 'int', 'unsigned' => true, 'not null' => true, 'default' => 0),          'type'        => 'varchar',
28            'length'      => 80,
29            'not null'    => true,
30            'default'     => '',
31            'description' => t('The query string. Will statistically often be empty is ZG is allowed to log empty searches.'),
32            ),
33          'category'    => array
34            (
35            'type'        => 'varchar',
36            'length'      => 64,
37            'not null'    => true,
38            'default'     => 'node',
39            'description' => t('The search category. Core categories are "node" and "user".'),
40            ),
41          'ts'          => array
42            (
43            'type'        => 'int',
44            'unsigned'    => true,
45            'not null'    => true,
46            'default'     => 0,
47            'description' => t('The timestamp of search submission. Duplicates <em>do</em> happen due to timer granularity.'),
48            ),
49        ),        ),
50      'primary key' => array(),  
51      'unique keys' => array(),      /*
52      'indexes' => array('search' => array('search')),       * ZG does not use a PK, because the timer granularity can actually cause duplicates,
53         * and there is no actual need to differentiate them. The alternatives would be heavier:
54         * adding an occurrence count on all rows, and update it instead of adding a row in the
55         * rare case when a duplicate occurs. This would be heavy on every request, with no obvious gain
56         * An additional solution would be to add an autoincrement column to differentiate otherwise
57         * identical rows, again to no actual benefit.
58         */
59        // 'primary key' => array(),
60        'unique keys'   => array(),
61        'indexes'       => array('search' => array('search')),
62        'description'   => t('The search logging table for the Zeitgeist module.'),
63      );      );
64    
65    return $schema;    return $schema;
# Line 53  function zeitgeist_update_1() Line 85  function zeitgeist_update_1()
85    }    }
86    
87  /**  /**
88     * Switch to the new schema numbering scheme. No actual change from 1
89     *
90     * @return array
91     */
92    function zeitgeist_update_6000()
93      {
94      $ret = array();
95      return $ret;
96      }
97    
98    /**
99   * implementation of hook_install from #72166 and #72662 combined   * implementation of hook_install from #72166 and #72662 combined
100   *   *
101   * @return void   * @return void

Legend:
Removed from v.1.1.6.3  
changed lines
  Added in v.1.1.6.4

  ViewVC Help
Powered by ViewVC 1.1.2