Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
gjaldon opened this issue Jun 27, 2019 · 0 comments
Open

Comments

@gjaldon
Copy link
Owner

gjaldon commented Jun 27, 2019

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). ^.^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant