Skip to content

generateMigrationScript gives redundant change in the type of the column to the same uuid type #2442

@SerVB

Description

@SerVB

Exposed 0.56.0, postgres.

I implemented my own IdTable replica: instead of client-side .autoGenerate(), it's server-side .defaultExpression(CustomFunction("gen_random_uuid", UUIDColumnType())) (inspired from #588 (comment)).

I then generate a migration script.

Actual:
ALTER TABLE locations ALTER COLUMN id TYPE uuid, ALTER COLUMN id SET DEFAULT gen_random_uuid();

Expected:
ALTER TABLE locations ALTER COLUMN id SET DEFAULT gen_random_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