Use bindings dbuser and dbname in sample_psql.eex
This commit is contained in:
parent
7c235b8874
commit
22d483d4f7
@ -1,6 +1,6 @@
|
|||||||
CREATE USER pleroma WITH ENCRYPTED PASSWORD '<%= dbpass %>';
|
CREATE USER <%= dbuser %> WITH ENCRYPTED PASSWORD '<%= dbpass %>';
|
||||||
CREATE DATABASE pleroma_dev OWNER pleroma;
|
CREATE DATABASE <%= dbname %> OWNER <%= dbuser %>;
|
||||||
\c pleroma_dev;
|
\c <%= dbname %>;
|
||||||
--Extensions made by ecto.migrate that need superuser access
|
--Extensions made by ecto.migrate that need superuser access
|
||||||
CREATE EXTENSION IF NOT EXISTS citext;
|
CREATE EXTENSION IF NOT EXISTS citext;
|
||||||
CREATE EXTENSION IF NOT EXISTS pg_trgm;
|
CREATE EXTENSION IF NOT EXISTS pg_trgm;
|
||||||
|
@ -94,8 +94,7 @@ defmodule Mix.Tasks.Pleroma.User do
|
|||||||
unless not proceed? do
|
unless not proceed? do
|
||||||
Common.start_pleroma()
|
Common.start_pleroma()
|
||||||
|
|
||||||
params =
|
params = %{
|
||||||
%{
|
|
||||||
nickname: nickname,
|
nickname: nickname,
|
||||||
email: email,
|
email: email,
|
||||||
password: password,
|
password: password,
|
||||||
@ -103,7 +102,6 @@ defmodule Mix.Tasks.Pleroma.User do
|
|||||||
name: name,
|
name: name,
|
||||||
bio: bio
|
bio: bio
|
||||||
}
|
}
|
||||||
|> IO.inspect()
|
|
||||||
|
|
||||||
user = User.register_changeset(%User{}, params)
|
user = User.register_changeset(%User{}, params)
|
||||||
Repo.insert!(user)
|
Repo.insert!(user)
|
||||||
|
Loading…
Reference in New Issue
Block a user