Insert always works (casts data)
Describe the bug
I have a simple table defined as such
CREATE TABLEaccount(user_nameTINYINT(4) NOT NULL,emailDATE NOT NULL )
My code is also simple from the documentation
$database->insert("account", [ "user_name" => "foo", "email" => "[email protected]" ]);
I was expecting this to fail as neither user_name nor email fits the datatype defined in the database, but Medoo seems to always be casting (converting) the data types, so I get a row with 0, 0000-00-00
How can I force this to be an error?
I've tried adding this to the configuration, but still get success
'option' => [ PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION ]
Information
- Version of Medoo: 1.7.8
- Type of Database (MySQL, MSSQL, SQLite...): MySQL
- System (Liunx\Windows\Mac): Windows
- PHP: 7.3.12
Hmm. Interesting. Did you figured out why?