Skip to content

date columns lacks default value

(Reported privately, but I suppose that a public issue report is better :-))

I am getting an error when trying to run the example on how to define a Starter device, documented in starter.html (just to have a permanent link, that points to 9.3.3. I am testing with 9.4.2):

host=$(hostname -s)
tango_admin --add-server Starter/$host Starter tango/admin/$host
/usr/lib/tango/Starter $host
Tango exception                                                                                                                                                                                                                          
Severity = ERROR                                                                                                                                                                                                                         
Error reason = DB_SQLError                                                                                                                                                                                                               
Desc : Failed to query TANGO database (error=Field 'date' doesn't have a default value)                                                                                                                                                  
.The query was: INSERT INTO property_device_hist SET device='tango/admin/ci-181-5f3cde04',id='1',name='polled_attr',count='1',value='hoststate'                                                                                          
Origin : DataBase::db_put_device_property                                                                                                                                                                                                
Tango exception                                                                                                                                                                                                                          
Severity = ERROR                                                                                                                                                                                                                         
Error reason = API_CommandFailed                                                                                                                                                                                                         
Desc : Failed to execute command_inout on device sys/database/2, command DbPutDeviceProperty                                                                                                                                             
Origin : virtual CORBA::Any_var Tango::Connection::command_inout(const std::string&, const CORBA::Any&) at (./lib/cpp/cppapi/client/devapi_base.cpp:1534)                                                                                
Received a CORBA_Exception                                                                                                                                                                                                               
Exiting

I've manually altered the table to set a default value as current_date, but that ends up in another error, that I will file along.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information