diff --git a/docs/changelog.rst b/docs/changelog.rst index 699fe6918..2aff16424 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -12,6 +12,12 @@ v4.x releases ^^^^^^^^^^^^^ +v4.4.2 - 2020-09-28 +------------------- + +- ``Fixed``: ``0017_energy_supplier_price_refactoring: psycopg2.IntegrityError: column "description" contains null values `` [`#1126 `_] + + v4.4.1 - 2020-09-25 ------------------- diff --git a/dsmr_consumption/migrations/0017_energy_supplier_price_refactoring.py b/dsmr_consumption/migrations/0017_energy_supplier_price_refactoring.py index f3518812f..3515686d7 100644 --- a/dsmr_consumption/migrations/0017_energy_supplier_price_refactoring.py +++ b/dsmr_consumption/migrations/0017_energy_supplier_price_refactoring.py @@ -18,6 +18,13 @@ def migrate_forward(apps, schema_editor): current.end = current.start + relativedelta.relativedelta(years=10) current.save() + # Fix NULL's + EnergySupplierPrice.objects.filter( + description__isnull=True + ).update( + description='' + ) + def migrate_backward(apps, schema_editor): # Unable to revert. diff --git a/dsmrreader/__init__.py b/dsmrreader/__init__.py index 74f5e1691..d4ee082b9 100644 --- a/dsmrreader/__init__.py +++ b/dsmrreader/__init__.py @@ -1,5 +1,5 @@ from django.utils.version import get_version -VERSION = (4, 4, 1, 'final', 0) +VERSION = (4, 4, 2, 'final', 0) __version__ = get_version(VERSION) diff --git a/dsmrreader/provisioning/downgrade/v4.4.2.sh b/dsmrreader/provisioning/downgrade/v4.4.2.sh new file mode 100644 index 000000000..e74854b1e --- /dev/null +++ b/dsmrreader/provisioning/downgrade/v4.4.2.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +# Dump for DSMR-reader v4.4.2 +./manage.py migrate dsmr_api 0003_create_api_user +./manage.py migrate dsmr_backend 0015_backend_restart_required +./manage.py migrate dsmr_backup 0011_remove_backupsettings_latest_backup +./manage.py migrate dsmr_consumption 0017_energy_supplier_price_refactoring +./manage.py migrate dsmr_datalogger 0028_drop_legacy_telegram_logging +./manage.py migrate dsmr_frontend 0042_v4_4_0_release +./manage.py migrate dsmr_influxdb 0004_client_settings_update +./manage.py migrate dsmr_mindergas 0005_schedule_mindergas_export +./manage.py migrate dsmr_mqtt 0017_mqtt_keep_reconnecting +./manage.py migrate dsmr_notification 0007_support_for_telegram +./manage.py migrate dsmr_pvoutput 0002_pvoutput_latest_sync +./manage.py migrate dsmr_stats 0015_fixed_daily_cost +./manage.py migrate dsmr_weather 0006_schedule_weather_update