Skip to content

Commit

Permalink
0017_energy_supplier_price_refactoring: psycopg2.IntegrityError: colu…
Browse files Browse the repository at this point in the history
…mn "description" contains null values #1126
  • Loading branch information
dennissiemensma committed Sep 27, 2020
1 parent f14bf5d commit f5acf5a
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 1 deletion.
6 changes: 6 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://github.com/dennissiemensma/dsmr-reader/issues/1126>`_]
v4.4.1 - 2020-09-25
-------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion dsmrreader/__init__.py
Original file line number Diff line number Diff line change
@@ -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)
16 changes: 16 additions & 0 deletions dsmrreader/provisioning/downgrade/v4.4.2.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit f5acf5a

Please sign in to comment.