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

Diff of /contributions/modules/feedback/feedback.install

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

revision 1.5.2.3, Wed Jul 16 11:16:39 2008 UTC revision 1.5.2.4, Sat Mar 21 20:22:32 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: feedback.install,v 1.5.2.2 2008/07/09 03:17:25 sun Exp $  // $Id: feedback.install,v 1.5.2.3 2008/07/16 11:16:39 sun Exp $
3    
4  /**  /**
5   * Implementation of hook_install().   * Implementation of hook_install().
# Line 15  function feedback_install() { Line 15  function feedback_install() {
15          message longtext NOT NULL,          message longtext NOT NULL,
16          location text NOT NULL,          location text NOT NULL,
17          location_masked text NOT NULL,          location_masked text NOT NULL,
18            url text NOT NULL,
19          timestamp int NOT NULL,          timestamp int NOT NULL,
20          useragent varchar(255) NOT NULL,          useragent varchar(255) NOT NULL,
21          PRIMARY KEY (fid),          PRIMARY KEY (fid),
# Line 31  function feedback_install() { Line 32  function feedback_install() {
32          message text NOT NULL,          message text NOT NULL,
33          location text NOT NULL,          location text NOT NULL,
34          location_masked text NOT NULL,          location_masked text NOT NULL,
35            url text NOT NULL,
36          timestamp int NOT NULL,          timestamp int NOT NULL,
37          useragent varchar(255) NOT NULL,          useragent varchar(255) NOT NULL,
38          PRIMARY KEY (fid)          PRIMARY KEY (fid)
# Line 87  function feedback_update_5201() { Line 89  function feedback_update_5201() {
89    }    }
90    return $ret;    return $ret;
91  }  }
92    
93    /**
94     * Add column for absolute URL.
95     */
96    function feedback_update_5202() {
97      $ret = array();
98      switch ($GLOBALS['db_type']) {
99        case 'mysql':
100        case 'mysqli':
101          $ret[] = update_sql("ALTER TABLE {feedback} ADD url text NOT NULL AFTER location_masked");
102          $ret[] = update_sql("UPDATE {feedback} SET url = location");
103          break;
104    
105        case 'pgsql':
106          db_add_column($ret, 'feedback', 'url', 'text', array('not null' => TRUE));
107          $ret[] = update_sql("UPDATE {feedback} SET url = location");
108          break;
109      }
110      return $ret;
111    }
112    

Legend:
Removed from v.1.5.2.3  
changed lines
  Added in v.1.5.2.4

  ViewVC Help
Powered by ViewVC 1.1.2