Files
twenty_crm/infra/dev/postgres/init.sql
Charles Bochet 77729e4d4b Update installation doc (#2019)
* Update installation doc

* Update install scripts

* Update install scripts
2023-10-14 13:43:45 +02:00

23 lines
701 B
SQL

-- 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})';
-- Connect to the "default" database
\c "default";
-- Create extension uuid-ossp
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
-- Create the tests database for e2e testing
CREATE DATABASE "test";
-- Connect to the "test" database for e2e testing
\c "test";