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

Diff of /contributions/modules/flexifilter/flexifilter.install

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

revision 1.6.2.2, Mon May 12 19:59:15 2008 UTC revision 1.6.2.3, Mon Jun 16 23:51:45 2008 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: flexifilter.install,v 1.6.2.1 2008/04/17 21:58:06 cwgordon7 Exp $  // $Id: flexifilter.install,v 1.6.2.2 2008/05/12 19:59:15 cwgordon7 Exp $
3    
4  /**  /**
5   * Implementation of hook_install().   * Implementation of hook_install().
# Line 60  function flexifilter_schema() { Line 60  function flexifilter_schema() {
60          'disp-width' => '4',          'disp-width' => '4',
61          'description' => t('Used to map Flexifilters to filters.'),          'description' => t('Used to map Flexifilters to filters.'),
62        ),        ),
       'pid_root' => array(  
         'type' => 'int',  
         'unsigned' => TRUE,  
         'not null' => FALSE,  
         'disp-width' => '10',  
         'description' => t('ID of a faux flexifilter part used as a parent for the root level components'),  
       ),  
63        'advanced' => array(        'advanced' => array(
64          'type' => 'int',          'type' => 'int',
65          'unsigned' => TRUE,          'unsigned' => TRUE,
# Line 128  function flexifilter_schema() { Line 121  function flexifilter_schema() {
121          'not null' => FALSE,          'not null' => FALSE,
122          'description' => t('Class name of the component / condition'),          'description' => t('Class name of the component / condition'),
123        ),        ),
124          'weight' => array(
125            'type' => 'int',
126            'not null' => TRUE,
127            'default' => 0,
128            'size' => 'tiny',
129            'description' => t('The weight of the flexifilter part, used for ordering.'),
130          ),
131        'settings' => array(        'settings' => array(
132          'type' => 'text',          'type' => 'text',
133          'size' => 'big',          'size' => 'big',
# Line 161  function flexifilter_update_6100($ret) { Line 161  function flexifilter_update_6100($ret) {
161    );    );
162    db_add_field($ret, $table, $field_name, $field_def);    db_add_field($ret, $table, $field_name, $field_def);
163    return $ret;    return $ret;
164    }
165    
166    /**
167     * Update function: remove the 'pid_root' column.
168     */
169    function flexifilter_update_6200($ret) {
170      db_drop_field($ret, 'flexifilters', 'pid_root');
171      return $ret;
172    }
173    
174    /**
175     * Update function: add the 'weight' column.
176     */
177    function flexifilter_update_6201($ret) {
178      $table = 'flexifilters_parts';
179      $field_name = 'weight';
180      $field_def = array(
181        'type' => 'int',
182        'not null' => TRUE,
183        'default' => 0,
184        'size' => 'tiny',
185        'description' => t('The weight of the flexifilter part, used for ordering.'),
186      );
187      db_add_field($ret, $table, $field_name, $field_def);
188      return $ret;
189  }  }

Legend:
Removed from v.1.6.2.2  
changed lines
  Added in v.1.6.2.3

  ViewVC Help
Powered by ViewVC 1.1.2