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

Diff of /contributions/modules/css/css.install

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

revision 1.1, Sun Nov 2 15:16:09 2008 UTC revision 1.2, Fri Dec 26 15:20:36 2008 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: css.install,v 1.1 2007/05/17 20:32:07 fago Exp $  // $Id: $
3  /*  
4   * Implementation of hook_install  /**
5   */   * Database table schema definition.
6  function css_install() {   */
7    switch ($GLOBALS['db_type']) {  function css_schema() {
8      case 'mysql':    $schema['css'] = array(
9      case 'mysqli':        'description' => t('CSS rules added to individual nodes.'),
10        db_query("CREATE TABLE {css} (        'fields' => array(
11            nid int(10) unsigned NOT NULL default '0',          'nid' => array(
12            css text NULL default NULL,            'description' => t('The {node}.nid for the CSS.'),
13            PRIMARY KEY (nid)            'type' => 'int',
14          ) /*!40100 DEFAULT CHARACTER SET utf8 */;");            'unsigned' => TRUE,
15        break;            'not null' => TRUE,
16      case 'pgsql':            'default' => 0
17      break;          ),
18    }          'css' => array(
19              'description' => t('The primary identifier for the relation.'),
20              'type' => 'text',
21              'not null' => FALSE,
22            ),
23          ),
24          'primary key' => array('nid'),
25      );
26      return $schema;
27    }
28    
29    
30    /**
31     * Implementation of hook_install().
32     */
33    function css_install() {
34      drupal_install_schema('css');
35    }
36    
37    
38    /**
39     * Implementation of hook_uninstall().
40     */
41    function css_uninstall() {
42      drupal_uninstall_schema('css');
43  }  }

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

  ViewVC Help
Powered by ViewVC 1.1.2