Skip to content

Action events do not support UUIDs #6922

@FinnPaes

Description

@FinnPaes
  • Laravel Version: 12.31.1
  • Nova Version: 5.7.5
  • PHP Version: 8.4.13
  • Database Driver & Version: MySQL 8.2.0
  • Operating System and Version: -
  • Browser type and version: -
  • Reproduction Repository: -

Description:

The action_events table from Laravel Nova does not support UUIDs for the actionable_id. This causes an error when you have a resource with UUID primary keys and you are trying to execute one of the default Nova actions (delete/restore for example).

On your own custom actions you can disable the action log: https://nova.laravel.com/docs/v5/actions/defining-actions#disabling-the-action-log
This should probably also automatically happen on the default Nova actions if the target model has the HasUuids concern.

Detailed steps to reproduce the issue on a fresh Nova installation:

  1. Create a model + migration with the primary key like this: $table->uuid('id')->primary();
  2. Add use HasUuids; to the model
  3. Create a Nova resource for that model
  4. Create a record
  5. Try to delete the record through the Nova action
  6. You will get an error like this:
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions