arangox_ecto
arangox_ecto copied to clipboard
Make migrate usable without mix to use in prod environment
ArangoXEcto version
v1.3.1
Feature type
Change to existing functionality
Proposed functionality
Now we can't use migration in a release because it depends on mix which is not available in this case.
The idea is to move code from Mix.ArangoXEcto and part of Mix.Tasks.Ecto.Migrate.Arango to inner modules in ArangoXEcto. On top of that, it is needed to remove dependencies to Mix inside these modules. Otherwise it is impossible to create a function in the release file to allow use of migrations in prod environment.
An idea is to do a similar work than ecto_sql with their migrator: https://github.com/elixir-ecto/ecto_sql/blob/master/lib/ecto/migrator.ex
Use case
It will allow to use migrations in prod environment, which is needed to deploy an app based on ArangoXEcto using an Arango cluster.
An Arango cluster can not create all collection on the fly and, without migrations index can not be defined in the dev environment and replicate in the prod env.
Version changes
No response
External dependencies
No response
Additional Context
No response
I came across this the other week and came to the same conclusion. It is something that is on the list for 1.4. If you feel like making a PR before then, please by all means. At the moment when I have time I am working on improved logging and telemetry.
Now I am in a hurry to ship a project. When it will be done, I will try to do it if I have not another shipping urgency ;)
I am pretty busy at the moment but will get to it when I can. I encourage you to make a PR. You can also get around it by running a shell command in your release file.
My previous message was not clear ;)
When "I said I am in a hurry to ship", it means that I don't have time to do the PR. For the moment I found a workaround with an init container which can do the migrations.
It was not to put pressure on you to do the PR.
My previous message was not clear ;)
When "I said I am in a hurry to ship", it means that I don't have time to do the PR. For the moment I found a workaround with an init container which can do the migrations.
It was not to put pressure on you to do the PR.
This will be available in the next version and has mostly been completed (just doing some tests and docs now).