i get this error in my laravel application i now made it with UUID's
[previous exception] [object] (PDOException(code: 01000): SQLSTATE[01000]: Warning: 1265 Data truncated for column 'model_id' at row 1 at
The error in my nova i get:
SQLSTATE[01000]: Warning: 1265 Data truncated for column 'model_id' at row 1 (Connection: mysql, SQL: insert into ' action_events' (' batch _id' , ' user_ids , ' name' , ' actionable_types , ' actionable_ids , 'target_type', ' target_ids , ' model_ty pes , ' model_ici , 'fields', ' original', ' changes', ' status', ' exception', ' updated_ats , ' created_ats ) values (9d328a48-3e45-470f-b029-ac5fde585f9a, 63dd2b10-f0fc-4923-9bd4-b9f9f0fb5efe, Create, App\Models\Company, 9d328a48-3db a-446a-86ed-1dff5a86d474, App\Models\Company, 9d328a48-3dba-446a-86ed-1dff5a86d474, App\Models\Company, 9d328a48-3dba-446a-86ed-1dff5a86d474, ?, {"name":"ddd","id":"9d328a48-3dba-446a-86ed-1dff5a86d474","updat ed_at":"2024-10-08T16:12:19.000000Z","created_at":"2024-10-08T16:12:19.000000Z1, finished„ 2024-10-08 16:12:19, 2024-10-08 16:12:19))
There was a problem submitting the form.
And this is my action_events:
Schema::create('action_events', function (Blueprint $table) {
$table->id();
$table->char('batch_id', 36);
$table->foreignIdFor(Util::userModel(), 'user_id')->index();
$table->string('name');
$table->string('actionable_type');
$table->uuid('actionable_id');
$table->string('target_type');
$table->uuid('target_id');
$table->string('model_type');
if (Builder::$defaultMorphKeyType === 'uuid') {
$table->uuid('model_id')->nullable();
} elseif (Builder::$defaultMorphKeyType === 'ulid') {
$table->ulid('model_id')->nullable();
} else {
$table->unsignedBigInteger('model_id')->nullable();
}
$table->text('fields');
$table->string('status', 25)->default('running');
$table->text('exception');
$table->timestamps();
$table->uuid('model_id')->nullable()->change();
$table->index(['batch_id', 'model_type', 'model_id']);
});
i can't find the problem, what do i do rong?