LocChat/bin/create_db.sh
2021-12-03 18:31:24 -07:00

13 lines
253 B
Bash

#!/bin/bash
source .env
echo "Creating db '$DATABASE_URL'"
pg_ctl status || pg_ctl start
{
createdb $DATABASE_URL && echo "Database '$DATABASE_URL' created successfully"
} || {
echo "Database '$DATABASE_URL' already exists, skipping creation."
}