twenty/infra/dev/postgres/init.sql

26 lines
686 B
MySQL
Raw Normal View History

-- Create the default database for development
2023-04-20 11:45:59 +00:00
CREATE DATABASE "default";
-- Create the tests database for e2e testing
2023-07-27 18:53:00 +00:00
CREATE DATABASE "test";
-- Create a twenty user
CREATE USER twenty PASSWORD 'twenty';
2023-08-10 22:09:52 +00:00
ALTER USER twenty CREATEDB;
-- Connect to the "default" database
\c "default";
-- 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";
-- 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";