thrivekit 2.0.17 → 2.0.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/ralph/loop.sh +13 -3
package/package.json
CHANGED
package/ralph/loop.sh
CHANGED
|
@@ -44,13 +44,23 @@ preflight_checks() {
|
|
|
44
44
|
# Check for alembic migrations
|
|
45
45
|
if [[ -d "$backend_dir/alembic" ]] || [[ -d "$backend_dir/migrations" ]]; then
|
|
46
46
|
printf " Database migrations... "
|
|
47
|
-
#
|
|
47
|
+
# Detect Python runner
|
|
48
|
+
local py_runner="python"
|
|
49
|
+
if [[ -f "$backend_dir/uv.lock" ]]; then
|
|
50
|
+
py_runner="uv run"
|
|
51
|
+
elif [[ -f "$backend_dir/poetry.lock" ]]; then
|
|
52
|
+
py_runner="poetry run"
|
|
53
|
+
fi
|
|
54
|
+
# Try to verify DB connection via alembic
|
|
48
55
|
if [[ -f "$backend_dir/alembic.ini" ]]; then
|
|
49
|
-
if (cd "$backend_dir" && alembic current >/dev/null 2>&1); then
|
|
56
|
+
if (cd "$backend_dir" && $py_runner alembic current >/dev/null 2>&1); then
|
|
50
57
|
print_success "ok"
|
|
58
|
+
elif docker compose exec -T api alembic current >/dev/null 2>&1; then
|
|
59
|
+
# Try via Docker if local fails
|
|
60
|
+
print_success "ok (via docker)"
|
|
51
61
|
else
|
|
52
62
|
print_warning "check DB connection"
|
|
53
|
-
echo " Run: cd $backend_dir && alembic current"
|
|
63
|
+
echo " Run: cd $backend_dir && $py_runner alembic current"
|
|
54
64
|
((warnings++))
|
|
55
65
|
fi
|
|
56
66
|
fi
|