mirror of
https://github.com/lingble/twenty.git
synced 2025-11-23 17:34:51 +00:00
26 lines
686 B
SQL
26 lines
686 B
SQL
-- Create the default database for development
|
|
CREATE DATABASE "default";
|
|
|
|
-- Create the tests database for e2e testing
|
|
CREATE DATABASE "test";
|
|
|
|
-- Create a twenty user
|
|
CREATE USER twenty PASSWORD 'twenty';
|
|
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";
|