I just upgraded an existing app from OC v2 to OC v3.
I have a model using the trait encryptable
that defines the field email
as encryptable.
With OC v2, it saves appropriately, but with OC v3 I have this error:
SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'email' at row 1
the code
Client::create([
'name' => 'John Does',
'email' => 'john.doe@gmail.com',
'mobile' => null,
'website' => null,
'timezone' => 'Asia/Singapore',
'coach_id' => 1,
'type_id' => 2, // client
'status' => ClientStatusEnum::ACTIVE,
'gender' => GenderEnum::FEMALE,
]);