Wordpress sqlite driver throw constraint exception when updating options
WordPress version: 6.4.1 sqlite-database-integration version: 2.1.2
After using the sqlite db driver, when I try to update Default post settings (Settings-Discussion) it always failed. And I can see the error log like this:
MySQL query: UPDATE
wp_optionsSEToption_value= NULL WHEREoption_name= 'comment_registration' Queries made or created this session were: Executing: BEGIN | (no parameters) Executing: UPDATEwp_optionsSEToption_value= NULL WHEREoption_name= :param0 | parameters: comment_registration Executing: ROLLBACK | (no parameters)
and
Error occurred at line 3373 in Function
handle_error. Error message was: SQLSTATE[23000]: Integrity constraint violation: 19 NOT NULL constraint failed: wp_options.option_value.
This issue appears to be caused by a misalignment of metadata for certain database tables.
Confirm, I have the same error. It look like on missing param1 instead of NULL.
Same issue. I just found a temporary working solution https://github.com/aaemnnosttv/wp-sqlite-db/issues/18#issuecomment-1031902955