NULL values on fid fails on postgresql

lamigo - July 9, 2009 - 08:30
Project:Bitcache
Version:6.x-1.0-beta2
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

module is setting a NULL value on insert to force the default value on fid:

* user warning: query: INSERT INTO files (fid, uid, filename, filepath, filemime, filesize, status, timestamp) VALUES (NULL, 1, 'drupal_bitcache_LKEZtk', '/tmp/drupal_bitcache_LKEZtk', 'application/octet-stream', 0, 0, 1247124010) in /var/www/drupal/sites/all/modules/bitcache/bitcache.module on line 866.

In order for this to work it should be a default value or be not expressed on the insert clause:

INSERT INTO files (fid, uid, filename, filepath, filemime, filesize, status, timestamp) VALUES (default, 1, 'drupal_bitcache_LKEZtk', '/tmp/drupal_bitcache_LKEZtk', 'application/octet-stream', 0, 0, 1247124010)

or

INSERT INTO files ( uid, filename, filepath, filemime, filesize, status, timestamp) VALUES ( 1, 'drupal_bitcache_LKEZtk', '/tmp/drupal_bitcache_LKEZtk', 'application/octet-stream', 0, 0, 1247124010)

best regards

 
 

Drupal is a registered trademark of Dries Buytaert.