This commit is contained in:
2026-04-06 23:50:24 +03:30
parent a67236d45c
commit ff464cb4a5
140 changed files with 2061 additions and 2702 deletions
+12
View File
@@ -0,0 +1,12 @@
#!/bin/sh
# Fix: جداول farm_data وجود ندارند اما migrationهای legacy با label قدیمی ثبت شده‌اند.
# اجرا: docker compose run --rm web sh /app/scripts/fix_farm_data_tables.sh
set -e
cd /app
echo "Resetting legacy sensor_data migrations (fake unapply - tables may not exist)..."
python manage.py migrate sensor_data zero --noinput --fake
echo "Re-applying legacy sensor_data migrations (--fake-initial if tables already exist)..."
python manage.py migrate sensor_data --noinput --fake-initial
echo "Done. Running seed_sensor_parameters..."
python manage.py seed_sensor_parameters
echo "All done."