I try to install WFM to clean drupal 6.9 & get this error
user warning: BLOB/TEXT column 'fdesc' can't have a default value query: CREATE TABLE webfm_file ( `fid` INT unsigned NOT NULL auto_increment, `uid` INT unsigned NOT NULL DEFAULT 0, `fpath` MEDIUMTEXT NOT NULL, `fsize` INT unsigned NOT NULL DEFAULT 0, `fmime` VARCHAR(255) NOT NULL DEFAULT '', `ftitle` VARCHAR(255) NOT NULL DEFAULT '', `fdesc` TEXT NOT NULL DEFAULT '', `fcreatedate` INT NOT NULL DEFAULT 0, `flang` VARCHAR(255) NOT NULL DEFAULT '', `fpublisher` VARCHAR(255) NOT NULL DEFAULT '', `fformat` VARCHAR(255) NOT NULL DEFAULT '', `fversion` INT NOT NULL DEFAULT 0, `perm` TINYINT NOT NULL DEFAULT 0, `dl_cnt` INT NOT NULL DEFAULT 0, PRIMARY KEY (fid) ) /*!40100 DEFAULT CHARACTER SET UTF8 */ in C:\www-root\d69\includes\database.inc on line 515.
I have MySql 5.0.51a and never get such kind of errors before.
Comments
Comment #1
robmilne commentedTry replacing the following line...
'fdesc' => array('type' => 'text', 'size' => 'normal', 'not null' => TRUE, 'default' => ''),...with
'fdesc' => array('type' => 'text', 'not null' => TRUE),...inside webfm.install
Comment #2
mas160 commentedSame.
Change suggested by robmilne will lead in later issue when i try to update metadata without entering a file desc ('column fdesc have no default').
Solved changing...
'fdesc' => array('type' => 'text', 'size' => 'normal', 'not null' => TRUE, 'default' => ''),with
'fdesc' => array('type' => 'text', 'size' => 'normal', 'not null' => FALSE),Hope helps.
Comment #3
mas160 commentedAdded:
just below line 2412 in webfm.module.
Tried in my installation (intranet app) seems OK
Comment #4
robmilne commentedYes. I have had this in my code for some time now but did not commit.
Comment #5
robmilne commentedSee rc5
Comment #7
jasoncd commentedI'm running Drupal 6.13 and WebFM 2.11 and the problem still exists.
Comment #8
robbin.zhao commentedline 71 'fdesc' => array('type' => 'text', 'size' => 'normal', 'not null' => TRUE, ),
I changed the install file, and remove the default value from array.
Hope it works for you!
Comment #9
mdeltito commentedThis issue is definitely still present in the latest point release 2.11
Comment #10
arthur.duarte commentedHi All.
I was having the same problem.
I have "phpmyadmin" installed so I went there to try executing the line that the module was having problem.
I could make it working by using executing this SQL instructions:
CREATE TABLE webfm_file ( `fid` INT unsigned NOT NULL auto_increment, `uid` INT unsigned NOT NULL DEFAULT 0, `fpath` MEDIUMTEXT NOT NULL, `fsize` INT unsigned NOT NULL DEFAULT 0, `fmime` VARCHAR(255) NOT NULL DEFAULT '', `ftitle` VARCHAR(255) NOT NULL DEFAULT '', `fdesc` TEXT NOT NULL, `fcreatedate` INT NOT NULL DEFAULT 0, `flang` VARCHAR(255) NOT NULL DEFAULT '', `fpublisher` VARCHAR(255) NOT NULL DEFAULT '', `fformat` VARCHAR(255) NOT NULL DEFAULT '', `fversion` INT NOT NULL DEFAULT 0, `perm` TINYINT NOT NULL DEFAULT 0, `dl_cnt` INT NOT NULL DEFAULT 0, PRIMARY KEY (fid) ) /*!40100 DEFAULT CHARACTER SET UTF8 */
Open Drupal database and execute this SQL.
Hope this helps.
Comment #11
jasoncd commentedBelated followup. I used robbin.joe's suggestion (#8) and it worked.
Comment #12
nhck commentedThis has been fixed some time ago, I believe.