diff --git a/scripts/seed-test-data.sh b/scripts/seed-test-data.sh index 0e75990..d832f73 100755 --- a/scripts/seed-test-data.sh +++ b/scripts/seed-test-data.sh @@ -24,3 +24,25 @@ if [ ! -f "$PROJECT_ROOT/pvv.sqlite" ] ; then fi sqlite3 "$PROJECT_ROOT/pvv.sqlite" < "$PROJECT_ROOT/dist/sql/test_data_sqlite.sql" + +# Loop over the last 4 days' unix timestamps in 5-minute intervals and insert test data +END_TIME=$(date +%s) +START_TIME=$((END_TIME - 4 * 24 * 60 * 60)) +for ((timestamp=START_TIME; timestamp<=END_TIME; timestamp+=60 * 5 * 10)); do + RANDOM_YES_NO=$((RANDOM % 2)) + sqlite3 "$PROJECT_ROOT/pvv.sqlite" <