Scheme error?

Hello everybody. Home assistant shows me an error and although I understand it, I don’t know why it occurs?
I imagine that the insert occurs automatically. If so, then is that field left over?
Thanks

sqlalchemy.exc.IntegrityError: (MySQLdb._exceptions.IntegrityError) (1364, "Field 'state_id' doesn't have a default value")
[SQL: INSERT INTO states (domain, entity_id, state, attributes, event_id, last_changed, last_updated, created, old_state_id) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s)]
[parameters: ('script', 'script.homeassistant_update', 'on', '{"last_triggered": "2021-06-16T00:55:37.552615+00:00", "mode": "single", "current": 1, "friendly_name": "homeassistant_update"}', 512625, datetime.datetime(2021, 6, 16, 0, 55, 37, 552870, tzinfo=datetime.timezone.utc), datetime.datetime(2021, 6, 16, 0, 55, 37, 552870, tzinfo=datetime.timezone.utc), datetime.datetime(2021, 6, 16, 0, 55, 37, 552870, tzinfo=datetime.timezone.utc), None)]
(Background on this error at: http://sqlalche.me/e/14/gkpj)