Db::insert does not work for me

Hi,
I’m struggling to INSERT a new row in a fresh database. Using the provided examples on this page:

Environment:
Kirby: 3.9.2
PHP: 8.2.3
Apache Webserver
All is running in Docker containers

Db::update() works great, no problem at all.
Example code:
$bool = Db::update('users', ['first_name' => 'Myname', 'email' => 'my@email.de'], ['id' => 1]);

Db::insert on the other hand doesn’t work at all. “false” is constantly given back.
Example code:
$id = Db::insert('users', ['first_name' => 'Anothername', 'email' => 'another@email.de']);

Since the applied examples are basically exactly as written on the provided page, okay, other field, I do not know where else to search or look.

These two code snippets have been tested with the newest, as of now, 2023-03-21, MariaDB 10 and MySQL 8 Servers. Exact same behaviour with both servers.

Does anybody have a hint what I could be missing? Thank you very much and all the best to everybody here.

Hm, maybe the id column is not set to auto_increment?

Hi texnixe,
what can I say, you’re a gem.
After reading your words I took a look and though the case wasn’t what you wrote, I needed to find out, that I defined a field incorrectly. DUH! Didn’t even come to my mind… After redefining, it works flawlessly. I’m sorry to have brought this up, since it was my fault why things weren’t working. Sometimes it’s very easy.
I wish U a very nice day and all the best.