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
This commit is contained in:
parent
1f1bc273d0
commit
90d37f74d2
4 changed files with 16 additions and 0 deletions
12
api/run-db_init-dev.sh
Executable file
12
api/run-db_init-dev.sh
Executable file
|
|
@ -0,0 +1,12 @@
|
|||
#!/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;"
|
||||
1
ee/api/.gitignore
vendored
1
ee/api/.gitignore
vendored
|
|
@ -278,3 +278,4 @@ Pipfile.lock
|
|||
/routers/subs/health.py
|
||||
/chalicelib/core/spot.py
|
||||
/chalicelib/core/unprocessed_sessions.py
|
||||
/run-db_init-dev.sh
|
||||
|
|
|
|||
|
|
@ -87,6 +87,7 @@ rm -rf ./routers/subs/__init__.py
|
|||
rm -rf ./routers/subs/v1_api.py
|
||||
rm -rf ./run-alerts-dev.sh
|
||||
rm -rf ./run-dev.sh
|
||||
rm -rf ./run-db_init-dev.sh
|
||||
rm -rf ./schemas/overrides.py
|
||||
rm -rf ./schemas/schemas.py
|
||||
rm -rf ./schemas/transformers_validators.py
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ BEGIN;
|
|||
CREATE SCHEMA IF NOT EXISTS events_common;
|
||||
CREATE SCHEMA IF NOT EXISTS events;
|
||||
CREATE SCHEMA IF NOT EXISTS events_ios;
|
||||
CREATE SCHEMA IF NOT EXISTS or_cache;
|
||||
CREATE EXTENSION IF NOT EXISTS pg_trgm;
|
||||
CREATE EXTENSION IF NOT EXISTS pgcrypto;
|
||||
|
||||
|
|
@ -1317,4 +1318,5 @@ CREATE TABLE or_cache.autocomplete_top_values
|
|||
UNIQUE NULLS NOT DISTINCT (project_id, event_type, event_key)
|
||||
);
|
||||
|
||||
|
||||
COMMIT;
|
||||
Loading…
Add table
Reference in a new issue