[odb-users] How to make default value work

walker at kolomedical.com walker at kolomedical.com
Sun May 12 23:16:18 EDT 2019


Hi,

    I meet the issue to add the option default value to sqlite database,  it shows “19 (1299): NOT NULL constraint failed: Examination.exam_datetime”,

how can I make this work for  below define, Thanks!
#pragma db options("DEFAULT CURRENT_TIMESTAMP")
    odb::nullable<std::string> exam_datetime_;




王华 - Walker



More information about the odb-users mailing list