Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.8.6

Request #14650 Allow empty timesstamp defaults
Submitted: 2008-09-16 13:31 UTC
From: yunosh Assigned:
Status: Bogus Package: MDB2_Schema (version 0.8.2)
PHP Version: Irrelevant OS:
Roadmaps: (Not assigned)    
Subscription  


 [2008-09-16 13:31 UTC] yunosh (Jan Schneider)
Description: ------------ Related to bugs #13544 and #14052, I would like to be able to really set an empty default value for timestamps. At the moment, empty values are not allowed by the parser, and leaving out the default completely make the unix timestamp 0 (1970-01-01 00:00:00) the default.

Comments

 [2008-10-24 23:56 UTC] ifeghali (Igor Feghali)
Hello Jan, can you please provide a test script ? Also, what DBMS are you using ? regards, Igor.
 [2008-10-25 09:34 UTC] yunosh (Jan Schneider)
What should the test script do? An example XML script is available at http://cvs.horde.org/co.php/horde/scripts/sql/create.xml?r=1.27, right the first table horde_alarms with the timestamp fields. MySQL and PostgreSQL are the most used RDBMS, but potentially any system may be used.
 [2008-11-23 11:50 UTC] hschletz (Holger Schletz)
That wouldn't work. PostgreSQL does not allow empty strings as timestamp input. Why don't you use NULL? Just leave out the <default> declaration and set set the 'force_defaults' option to false.
 [2008-12-08 18:38 UTC] yunosh (Jan Schneider)
I didn't know about the force_defaults setting. Seems to work like a charm, thanks.