Added script to setup database locally on Linux/WSL (#1879)

* Created script to install and setup PostgreSQL database for Linux/WSL

* Updated Docs
This commit is contained in:
Gaurav
2023-10-05 19:47:27 +05:30
committed by GitHub
parent a04bdc6824
commit b8282e6789
3 changed files with 88 additions and 32 deletions

View File

@@ -1,3 +1,11 @@
-- Create table "default" for local setup without docker
SELECT 'CREATE DATABASE "default"'
WHERE NOT EXISTS (SELECT FROM pg_database WHERE datname = 'default')\gexec
-- Create user "twenty" for local setup without docker
SELECT 'CREATE USER twenty PASSWORD ''twenty'''
WHERE NOT EXISTS (SELECT FROM pg_user WHERE usename = 'twenty')\gexec
-- Inflect names for pg_graphql
COMMENT ON SCHEMA "public" IS '@graphql({"inflect_names": true})';