Using memento with Phoenix releases
Opened this issue · 2 comments
Hello
Im trying to build a release of an application that uses Memento.
When running the app with mix phx.server
everything works as expected.
When I try to create a production release, I get an error when trying to access the store.
%Memento.Error{message: "Transaction Failed with: {:no_exists, Sigfox.DeviceState}"}
Any help would be much appreciated.
Thanks
Similar problem over here, have you find any solutions @ghost?
I'm just getting started with Memento, and so have not made it to production yet. My guess, though, is that you have not called Memento.Table.create/1
as a part of your release process.
Depending on where you're deploying, you might need to add some release code in the same way that you would run Ecto migrations.
I like to use Application start phases, which require adding start_phases
to the application callback in mix.exs. So I'm planning to add start_phases: [memento: []]
, and then create my tables in my application callback.