D4no0
Automated migrations vs multiple versions
I am working currently on an application that performs some automated tasks and saves data in a specific format in the database. The idea of the application is that it is developed with agile approach, meaning that the logic of the tasks and the format of the data will always change in the future, and at the same time the format of the data is important because there are some templates that need to display that data.
I was thinking about 2 approaches:
- Version the data and the display views, so each format of the data can be displayed accordingly - the problem with this approach is that you need to keep old versions source code, witch can get hairy in the long run;
- Create data migration scripts - this option is more appealing at first, however the requirement of the project is that it should work on self-hosted instances and doing more tricky manual migrations is out of the question.
This is a pretty common problem nowadays, maybe there are some standardized approaches or libraries to deal with these problems? Any ideas or advices?
Most Liked
LostKobrakai
While is was created to aid with event sourced systems I found this a valuable discussion on the topic no matter the underlying system. In the end I think event sourcing is just a more explicit form of what happens in CRUD as well. Event sourcing just doesn’t throw away the history immediately and continues to use it as it’s source of truth.
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance









