From dd47dabe88dd5bf56629b3e31b1a2c2f696e4e97 Mon Sep 17 00:00:00 2001 From: Martin/Geno Date: Fri, 18 Oct 2019 20:04:39 +0200 Subject: [PATCH] support: add setup_db.psql --- .gitignore | 2 +- support/postgresql/setup_db.psql | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 support/postgresql/setup_db.psql diff --git a/.gitignore b/.gitignore index 9a576afea..0a0f0f366 100644 --- a/.gitignore +++ b/.gitignore @@ -20,7 +20,7 @@ erl_crash.dump /.env .env.2 -setup_db.psql +/setup_db.psql .elixir_ls /doc diff --git a/support/postgresql/setup_db.psql b/support/postgresql/setup_db.psql new file mode 100644 index 000000000..167a4be45 --- /dev/null +++ b/support/postgresql/setup_db.psql @@ -0,0 +1,8 @@ +CREATE USER <%= database_username %> WITH ENCRYPTED PASSWORD '<%= database_password %>'; +CREATE DATABASE <%= database_name %> OWNER <%= database_username %>; + +\c <%= database_name %> + +CREATE EXTENSION postgis; +CREATE EXTENSION pg_trgm; +CREATE EXTENSION unaccent;