Skip to content

Postgres domain typesΒ #2863

@Huliiiiii

Description

@Huliiiiii

Discussed in #2862

Originally posted by sfried December 19, 2025
In postgres, domains provide a very convenient means of defining a new type, with its own enforcement mechanisms and documentation clarity. A bijection should be created between these two:

  • sea-orm-cli's generate entity should create the relevant newtypes, and use those types in the generated models
  • sea-orm should recognize newtypes being used in a model, and create the relevant domains (even if the new domain doesn't have the full checking defined in the rust code)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions