Skip to content

Add function for checking if EctoEnum types match with Postgresql types #80

@gjaldon

Description

@gjaldon

Request from https://elixirforum.com/t/ectoenum-ecto-extension-to-support-enums-in-ecto-models/23440/2?u=gjaldon:

Would it be possible to have a function that we can call that checks the postgresql database’s Enum definition and makes sure it matches the defenum definition, and if there are any inconsistencies then it would return back, say, a {:error, reason} where reason is a list of the inconsistencies so we can log it or error or whatever we want (in addition to other reason codes like the Repo passed in is failing or something, :ok means successful and everything matches)?

I have to match to a pre-existing type of a backend database so I’d like to make sure I stay in sync, especially as it updates (been bit once by this). ^.^

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions