made psql script compatible with migrations or generate_config reruns
[akkoma] / lib / mix / tasks / sample_psql.eex
1 CREATE USER IF NOT EXISTS pleroma WITH ENCRYPTED PASSWORD '<%= dbpass %>' CREATEDB;
2 -- in case someone runs this second time accidentally
3 ALTER USER pleroma WITH ENCRYPTED PASSWORD '<%= dbpass %>' CREATEDB;
4 CREATE DATABASE IF NOT EXISTS pleroma_dev;
5 ALTER DATABASE pleroma_dev OWNER TO pleroma;
6 \c pleroma_dev;
7 --Extensions made by ecto.migrate that need superuser access
8 CREATE EXTENSION IF NOT EXISTS citext;