Problem with Maria-DB-Persistence

Hi there,
For a long time I have successfully persisted various variables in a Maria DB.
Now today I wanted to add another variable. I get the following error message for this variable:

2020-12-21 14:07:00.275 [ERROR] [sql.internal.MysqlPersistenceService] - mySQL: Could not create entry for ‘Total_Energy’ in table ‘Items’ with statement ‘INSERT INTO Items (ItemName) VALUES (?)’: Field ‘kommentar’ doesn’t have a default value

Nothing has changed in the persistence, the other variables still work perfectly!
Where’s the problem? Could this have happened during an update from openHAB?

openHAB 2.5.9

Can you check if the Entry is maybe already in the Items.

Select * From Items

Try to find Total_Energy

If it is already there. The dirty and fast fix ‘change the name of the item’.

The item is not yet available in the DB.
As I understand it, the SQL command is missing the value for the ‘kommentar’ field.
When I created the Maria-DB-Persistence it didn’t matter. All of my items could be persisted without any problems. Only now does this error message appear.
Could it be that a setting on the Maria DB side causes the error?

I found the mistake.
A long time ago I added a field for comments in the item table. This field was marked as default and did not have to be written. Something had changed this attribute.
No openHAB problem!

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.