2023-07-27 16:48:40 +00:00
|
|
|
-- Create the default database for development
|
2023-04-20 11:45:59 +00:00
|
|
|
CREATE DATABASE "default";
|
2023-07-27 16:48:40 +00:00
|
|
|
|
|
|
|
|
-- Create the tests database for e2e testing
|
2023-07-27 18:53:00 +00:00
|
|
|
CREATE DATABASE "test";
|
2023-08-10 05:24:15 +00:00
|
|
|
|
|
|
|
|
-- Create a twenty user
|
|
|
|
|
CREATE USER twenty PASSWORD 'twenty';
|
2023-08-10 22:09:52 +00:00
|
|
|
ALTER USER twenty CREATEDB;
|
2023-09-21 00:24:13 +00:00
|
|
|
|
|
|
|
|
-- Connect to the "default" database
|
|
|
|
|
\c "default";
|
|
|
|
|
|
|
|
|
|
-- Create the metadata schema if it doesn't exist
|
|
|
|
|
CREATE SCHEMA IF NOT EXISTS "metadata";
|
2023-09-21 02:11:21 +00:00
|
|
|
GRANT ALL ON SCHEMA metadata TO twenty;
|
|
|
|
|
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
|
|
|
|
|
|
|
|
|
|
-- Connect to the "default" database
|
|
|
|
|
\c "test";
|
|
|
|
|
|
|
|
|
|
-- Create the metadata schema if it doesn't exist
|
|
|
|
|
CREATE SCHEMA IF NOT EXISTS "metadata";
|
|
|
|
|
GRANT ALL ON SCHEMA metadata TO twenty;
|
|
|
|
|
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
|