smpallen99 / whatwasit

Track changes to your Ecto models
MIT License
63 stars 8 forks source link

Question: why migration and model are generated? #15

Closed Eiji7 closed 8 years ago

Eiji7 commented 8 years ago

In migration we can easily add if statement for app config.

I know that calculating changeset_fields and schema_fields on each request is not a good idea. Is saving them in configuration (or :ets) after app start (and before listen for requests) and read them in model is bad idea? Now we have: version.ex and version_map.ex templates. They are similar and could be written at once with some if's (based on app config).

What do you think about it?

smpallen99 commented 8 years ago

I don't really understand most of your comment. However, your right, there is a lot of duplicate code between version.ex and version_map.ex. I agree, it should be refactored into one.

Eiji7 commented 8 years ago

I'm preparing to help you maintain this code. I'm new in elixir/erlang, but I had lots of hours in ruby/rails (MVC and other things are not problem for me). I will ask some questions to elixir forum for complete my knowlegde about how ecto works (callbacks/changeset and migrations). I want to resolve all my issues, but don't know how long it will take.

Eiji7 commented 8 years ago

17