mix format
This commit is contained in:
parent
f3c35e8e55
commit
385afb9308
6 changed files with 77 additions and 46 deletions
|
@ -21,11 +21,14 @@ defmodule Nulla.Repo.Migrations.CreateInstanceSettings do
|
|||
execute(fn ->
|
||||
{public_key, private_key} = Nulla.KeyGen.generate_keys()
|
||||
now = NaiveDateTime.utc_now() |> NaiveDateTime.truncate(:second)
|
||||
|
||||
domain =
|
||||
Application.get_env(:nulla, NullaWeb.Endpoint, [])
|
||||
|> Keyword.get(:url, [])
|
||||
|> Keyword.get(:host, "localhost")
|
||||
Application.get_env(:nulla, NullaWeb.Endpoint, [])
|
||||
|> Keyword.get(:url, [])
|
||||
|> Keyword.get(:host, "localhost")
|
||||
|
||||
esc = fn str -> "'#{String.replace(str, "'", "''")}'" end
|
||||
|
||||
sql = """
|
||||
INSERT INTO instance_settings (
|
||||
name, description, domain, registration,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue