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

Plugin Request: Generate Ecto "schema.ex" and "migration.exs" files for Elixir/Ecto Language Platform #21

Open
mrjbj opened this issue Jan 22, 2022 · 0 comments

Comments

@mrjbj
Copy link

mrjbj commented Jan 22, 2022

I love pgModeler but am struggling to integrate it into the workflow by Elixir developers. Elixir uses a database persistence framework called "Ecto", which is actually freaking amazing. However, it requires two files be maintained in a "code-first" approach to the database. The first file (called a "schema") governs how application data is cast to/from data types in the UI to database (and that data passes business validations). The second file (called a "migration") is used to create/alter/seed the database itself.

My current workflow is to design in pgModeler, then manually create these two files based pretty much 1:1 from column content already designed into pgModeler. It would be super helpful if the "create code" feature of pgModeler could be templated in such a way as to emit these Elixir/Ecto schema and migration files as an option. Given that the pgModeler files are saved in XML format, I suppose I could probably figure out a way transform from this using Elixir myself, but I was thinking perhaps this plugin architecture might be an easier or more supportable way of doing so instead.

Here is a link to overview on Ecto, if interested. No worries if not a good idea or not enough people use Elixir yet. Just wanted to get the idea out there for consideration. Thank you.

Elixir/Ecto Basic Overview

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