Skip to content

RFC: Should MigrationOnly indicate nullability? #918

@parsonsmatt

Description

@parsonsmatt

Currently, using MigrationOnly on a column will omit the field from the Haskell datatype but the resulting SQL is still intact.

This means if you do an insert on a record with a non-nullable (and no default) MigrationOnly column that it will fail at runtime with a "missing value" error.

You can fix this by doing field FieldType Maybe MigrationOnly. Should MigrationOnly imply Maybe?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions