mirror of
https://github.com/optim-enterprises-bv/openlan-cgw.git
synced 2025-11-02 11:17:47 +00:00
10 lines
462 B
Bash
Executable File
10 lines
462 B
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
|
|
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" <<-EOSQL
|
|
CREATE USER $CGW_DB_USER WITH ENCRYPTED PASSWORD '$CGW_DB_PASSWORD';
|
|
CREATE DATABASE $CGW_DB OWNER $CGW_DB_USER;
|
|
CREATE TABLE infrastructure_groups ( id INT PRIMARY KEY, reserved_size INT, actual_size INT);
|
|
CREATE TABLE infras ( mac MACADDR PRIMARY KEY, infra_group_id INT, FOREIGN KEY(infra_group_id) REFERENCES infrastructure_groups(id) ON DELETE CASCADE);
|
|
EOSQL
|