Skip to content

cannot cast type bigint to uuid #455

Open
@mathiasag7

Description

@mathiasag7

Hello, I put version 1.5.0 on the project from which all this started and I noticed something that is due to the migration file 0010. In fact, we can't go from a BigAutoField to a UUIDField directly, nor can we do the reverse: to do so, we'd have to go through a CharField, which leads us to the fact that migration 0010 has to be a migration that transforms the id field into a Charfield rather than a BigAutoField. Otherwise, we won't be able to use the UUIDField option for ids in this version without using the step of conveying the pk into a CharField and then now into a uuid, whereas we'd like a project without data to be able to choose what type it wants for its basic pk. Here's the error

django.db.utils.ProgrammingError: cannot cast type bigint to uuid
LINE 1: ..."eav_attribute" ALTER COLUMN "id" TYPE uuid USING "id"::uuid

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