Error installing this module under mysql 5.1.31 for windows:

user warning: BLOB/TEXT column 'data' can't have a default value query: CREATE TABLE x_album ( `pid` INT unsigned NOT NULL, `fid` INT unsigned NOT NULL, `count` INT NOT NULL, `data` LONGTEXT DEFAULT '', PRIMARY KEY (pid), INDEX fid (fid), INDEX count (count) ) /*!40100 DEFAULT CHARACTER SET UTF8 */ in C:\Apache Software Foundation\Apache2.2\htdocs\website\includes\database.inc on line 515.

CommentFileSizeAuthor
#1 photos.install.txt11.07 KBeastcn

Comments

eastcn’s picture

StatusFileSize
new11.07 KB

Please apply this patch:


Index: photos.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/photos/photos.install,v
retrieving revision 1.1.2.5
diff -u -r1.1.2.5 photos.install
--- photos.install   6 Mar 2009 08:18:44 -0000   1.1.2.5
+++ photos.install   11 Mar 2009 00:57:05 -0000
@@ -6,7 +6,7 @@
        'pid'    => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE),
        'fid'    => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE),
       'count'    => array('type' => 'int', 'not null' => TRUE),
-      'data'    => array('type' => 'text', 'default' => '', 'size' => 'big')
+      'data'    => array('type' => 'text', 'not null' => TRUE, 'size' => 'big')
     ),
     'indexes' => array(
        'fid' => array('fid'),
@@ -18,7 +18,7 @@
     'fields' => array(
        'fid'    => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE),
        'pid'    => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE),
-       'des'    => array('type' => 'text', 'not null' => TRUE,'size' => 'big'),
+       'des'    => array('type' => 'text', 'not null' => TRUE, 'size' => 'big'),
        'wid'    => array('type' => 'int', 'size' => 'tiny', 'length' => 4, 'not null' => TRUE),
        'count'    => array('type' => 'int', 'not null' => TRUE),
       'comcount'    => array('type' => 'int', 'not null' => TRUE),
@@ -143,7 +143,7 @@
   db_drop_index($ret, 'x_album', 'uid');
   db_change_field($ret, 'x_album', 'uid', 'count', array('type' => 'int', 'not null' => TRUE));
   db_add_index($ret, 'x_album', 'count', array('count'));
-  db_add_field($ret, 'x_album', 'data', array('type' => 'text', 'default' => '', 'size' => 'big'));
+  db_add_field($ret, 'x_album', 'data', array('type' => 'text', 'not null' => TRUE, 'size' => 'big'));
   $result = db_query('SELECT pid FROM {x_album} ORDER BY pid ASC');
   while($image = db_fetch_object($result)){
     db_query('UPDATE {x_album} SET count = (SELECT count(pid) FROM {x_image} WHERE pid = %d) WHERE pid = %d', $image->pid, $image->pid);

Success, CVS operation completed

my.wahyu’s picture

My Experience

Update Modul Photos

my old version is : photos-6.x-2.5-beta4.tar.gz

when I update my module with : photos-6.x-2.6-beta2.tar.gz

http://gastia.com/photos/album

Fatal error: Call to undefined function _photos_num() in /home/syarifah/public_html/sites/all/modules/photos/photos.page.inc on line 475

Dont Panic You only do this (its depend on how much table in your photos database) :

  1. Run Cron
  2. Update database in maintenance section
avpaderno’s picture

Assigned: alessandrovicente » Unassigned
nathaniel’s picture

Status: Active » Closed (fixed)