-
Notifications
You must be signed in to change notification settings - Fork 49
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
Running tenant migrations without Mix for apps deployed via mix release #85
Comments
Thanks for the report @haizop! Here are your answers:
Should be possible, as it is basically doing pretty much the same that is done on your
By looking at the error, looks like the
There is nothing really specific to Triplex, the thing is that you kinda need to know some of the inner workings of ecto to actually make it work correctly, and that's an Ecto thing, not just specific to Triplex. |
@kelvinst . Thank you for the reply. I hear you that this is not a problem specific to Triplex, but given that Mix releases are a pretty standard method of deployment, do you think that some deployment guidelines should be added to Triplex documentation? This is what I have working now:
|
@haizop definitely! A PR with a guide for that is totally welcome. Will leave this issue open to remember to do exactly that. |
@kelvinst Will get you a PR in the next couple of weeks. |
Scenario
We deploy using releases, thus Mix is not available and we cannot migrate in production (or other server environments) using the Triplex Mix tasks. We run our public schema migrations via a similar Release module to the one recommended in the Phoenix documentation. To that basic structure, we added an additional
migrate_tenants
function:Problem
The
migrate_tenants
function succeeds when run via a remote IEx session or rpc, but fails when run via eval, iebin/my_app eval "MyApp.Release.migrate_tenants()"
. This is in contrast to themigrate
function which succeeds when run via either remote IEx, rpc, or eval. The error observed is the following:Questions
Notes:
The text was updated successfully, but these errors were encountered: