From 7c597879aa0d1c3764a9db25b8fc20689e411064 Mon Sep 17 00:00:00 2001 From: Matt Hammerly Date: Thu, 28 Mar 2024 07:16:45 -0700 Subject: [PATCH 1/3] fix: uppercase enterprise env var name --- dev.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev.sh b/dev.sh index 2a9ad4f212..d53e1a135f 100755 --- a/dev.sh +++ b/dev.sh @@ -15,7 +15,7 @@ _start_gunicorn() { if [[ "$STATSD_HOST" ]]; then suffix="--statsd-host ${STATSD_HOST}:${STATSD_PORT}" fi - if [[ "$RUN_ENV" == "enterprise" ]] || [[ "$RUN_ENV" == "DEV" ]]; then + if [[ "$RUN_ENV" == "ENTERPRISE" ]] || [[ "$RUN_ENV" == "DEV" ]]; then python manage.py migrate python manage.py migrate --database "timeseries" fi From 68456e1c8346920e0edf32fe866d92dde3616e08 Mon Sep 17 00:00:00 2001 From: Matt Hammerly Date: Thu, 28 Mar 2024 07:20:27 -0700 Subject: [PATCH 2/3] run timeseries migrations too in enterprise.sh --- enterprise.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/enterprise.sh b/enterprise.sh index 66668f7452..78f2ce35e0 100755 --- a/enterprise.sh +++ b/enterprise.sh @@ -29,6 +29,7 @@ if [[ "$1" = "api" || -z "$1" ]]; then # Migrate python manage.py migrate + python manage.py migrate --database "timeseries" # Start api ${SUB}$prefix gunicorn codecov.wsgi:application --workers=$GUNICORN_WORKERS --bind ${CODECOV_API_BIND:-0.0.0.0}:${CODECOV_API_PORT:-8000} --access-logfile '-' ${statsd}--timeout "${GUNICORN_TIMEOUT:-600}"${POST} elif [[ "$1" = "rti" ]]; @@ -38,6 +39,7 @@ then elif [[ "$1" = "migrate" ]]; then python manage.py migrate + python manage.py migrate --database "timeseries" else exec "$@" fi From c311e10bdd01ffb24d40d853a5e8148634be1859 Mon Sep 17 00:00:00 2001 From: Matt Hammerly Date: Thu, 28 Mar 2024 07:40:44 -0700 Subject: [PATCH 3/3] allow lowercase enterprise run_env too --- dev.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev.sh b/dev.sh index d53e1a135f..5243176c94 100755 --- a/dev.sh +++ b/dev.sh @@ -15,7 +15,7 @@ _start_gunicorn() { if [[ "$STATSD_HOST" ]]; then suffix="--statsd-host ${STATSD_HOST}:${STATSD_PORT}" fi - if [[ "$RUN_ENV" == "ENTERPRISE" ]] || [[ "$RUN_ENV" == "DEV" ]]; then + if [[ "$RUN_ENV" == "ENTERPRISE" ]] || [[ "$RUN_ENV" == "enterprise" ]] || [[ "$RUN_ENV" == "DEV" ]]; then python manage.py migrate python manage.py migrate --database "timeseries" fi