Skip to content

Allow configurable column types for auditable_id and associated_id #763

@ryush00

Description

@ryush00

Follow-up to #361: Auditing models with UUID pk

Currently, only the result of calling to_i on a UUID string is stored, which gives the illusion of working correctly:

> "78035962-1234-1234-1234-9c394a3e5a0b".to_i
=> 78035962
  • When the UUID contains hyphens, to_i stops at the first alphabet.
  • If there are no hyphens, the integer may exceed the 4‑byte limit and raise an error.

To address this, I propose one of the following:

  1. Update the README to explicitly state that UUIDs are not supported.
  2. Extend PR Support UUID primary keys for User #333’s column‑type configuration to include auditable_id and associated_id, allowing full UUID support.
  3. Convert all ID columns to string types so they can store complete UUIDs.

PR #333 currently only lets you change user_id’s type. Extending support to these other ID columns would enable full UUID compatibility.

Related: #651

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