openreplay/api/run-db_init-dev.sh
Kraiem Taha Yassine 90d37f74d2
Dev (#2524)
* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* fix(DB): fixed init schema
dev(DB): script to run init schema against dev servers
2024-09-02 14:26:17 +02:00

12 lines
No EOL
437 B
Bash
Executable file

#!/bin/zsh
set -a
. .env
pg_dbname='release_test'
init_script='../scripts/schema/db/init_dbs/postgresql/init_schema.sql'
PGPASSWORD=$pg_password
psql -h $pg_host -p $pg_port -U $pg_user -v ON_ERROR_STOP=1 -c "CREATE DATABASE $pg_dbname;"
sleep 1s
psql -h $pg_host -p $pg_port -U $pg_user -d $pg_dbname -v ON_ERROR_STOP=1 -f $init_script
sleep 1s
psql -h $pg_host -p $pg_port -U $pg_user -v ON_ERROR_STOP=1 -c "DROP DATABASE $pg_dbname;"