This commit is contained in:
julian
2024-07-11 15:41:04 -03:00
parent d22e2a9197
commit 240912d65d
16 changed files with 55 additions and 1 deletions

28
lib/derivantes/release.ex Normal file
View File

@ -0,0 +1,28 @@
defmodule Derivantes.Release do
@moduledoc """
Used for executing DB release tasks when run in production without Mix
installed.
"""
@app :derivantes
def migrate do
load_app()
for repo <- repos() do
{:ok, _, _} = Ecto.Migrator.with_repo(repo, &Ecto.Migrator.run(&1, :up, all: true))
end
end
def rollback(repo, version) do
load_app()
{:ok, _, _} = Ecto.Migrator.with_repo(repo, &Ecto.Migrator.run(&1, :down, to: version))
end
defp repos do
Application.fetch_env!(@app, :ecto_repos)
end
defp load_app do
Application.load(@app)
end
end

View File

@ -1,4 +1,5 @@
<.flash_group flash={@flash} />
<div>
<!--<.flash_group flash={@flash} />
<div class="left-[40rem] fixed inset-y-0 right-0 z-0 hidden lg:block xl:left-[50rem]">
<svg
viewBox="0 0 1480 957"
@ -221,4 +222,5 @@
</div>
</div>
</div>
</div> -->
</div>