zf

zenflows testing
git clone https://s.sonu.ch/~srfsh/zf.git
Log | Files | Refs | Submodules | README | LICENSE

commit 01c78e00ff0f3b31f881814e72b4b0b11c2aa5b2
parent e6555e260ae8eef97de16c42c3f89dfde5cfc3e7
Author: srfsh <dev@srf.sh>
Date:   Tue, 11 Oct 2022 17:33:16 +0300

Zenflows.Application: migrate on startup

Unless $NOMIGRATE is provided, migrate on startup.

Diffstat:
Msrc/zenflows/application.ex | 7+++++++
1 file changed, 7 insertions(+), 0 deletions(-)

diff --git a/src/zenflows/application.ex b/src/zenflows/application.ex @@ -23,6 +23,8 @@ use Application def start(_type, _args) do print_header() + migrate() + children = [ Zenflows.DB.Repo, Zenflows.InstVars.Domain, @@ -56,4 +58,9 @@ defp print_header() do """) end end + +defp migrate() do + unless System.get_env("NOMIGRATE"), + do: Zenflows.Reltask.migrate() +end end