Add ash framework
This commit is contained in:
parent
c16c411891
commit
86437cbb9d
10 changed files with 278 additions and 8 deletions
|
|
@ -1,5 +1,22 @@
|
|||
defmodule Mv.Repo do
|
||||
use Ecto.Repo,
|
||||
otp_app: :mv,
|
||||
adapter: Ecto.Adapters.Postgres
|
||||
use AshPostgres.Repo,
|
||||
otp_app: :mv
|
||||
|
||||
@impl true
|
||||
def installed_extensions do
|
||||
# Add extensions here, and the migration generator will install them.
|
||||
["ash-functions"]
|
||||
end
|
||||
|
||||
# Don't open unnecessary transactions
|
||||
# will default to `false` in 4.0
|
||||
@impl true
|
||||
def prefer_transaction? do
|
||||
false
|
||||
end
|
||||
|
||||
@impl true
|
||||
def min_pg_version do
|
||||
%Version{major: 17, minor: 2, patch: 0}
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en" class="[scrollbar-gutter:stable]">
|
||||
<head>
|
||||
<%= Application.get_env(:live_debugger, :live_debugger_tags) %>
|
||||
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<meta name="csrf-token" content={get_csrf_token()} />
|
||||
|
|
|
|||
|
|
@ -41,4 +41,14 @@ defmodule MvWeb.Router do
|
|||
forward "/mailbox", Plug.Swoosh.MailboxPreview
|
||||
end
|
||||
end
|
||||
|
||||
if Application.compile_env(:mv, :dev_routes) do
|
||||
import AshAdmin.Router
|
||||
|
||||
scope "/admin" do
|
||||
pipe_through :browser
|
||||
|
||||
ash_admin "/"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue