Skip to content
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

Using memento with Phoenix releases #31

Open
ghost opened this issue Mar 9, 2022 · 2 comments
Open

Using memento with Phoenix releases #31

ghost opened this issue Mar 9, 2022 · 2 comments

Comments

@ghost
Copy link

ghost commented Mar 9, 2022

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

@thiagomajesk
Copy link

Similar problem over here, have you find any solutions @ghost?

@sax
Copy link
Contributor

sax commented Dec 30, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants