Add sensor_data app to Django settings and URL routing
- Included sensor_data in the INSTALLED_APPS of settings.py. - Added URL path for sensor_data in urls.py to enable API access.
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
# Fix: جداول sensor_data وجود ندارند اما migrationها بهعنوان اعمالشده ثبت شدهاند.
|
||||
# اجرا: docker compose run --rm web sh /app/scripts/fix_sensor_data_tables.sh
|
||||
set -e
|
||||
cd /app
|
||||
echo "Resetting sensor_data migrations (fake unapply - tables may not exist)..."
|
||||
python manage.py migrate sensor_data zero --noinput --fake
|
||||
echo "Re-applying 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."
|
||||
Reference in New Issue
Block a user