From 2ba19738758f6409d1a5a416081694741b78f348 Mon Sep 17 00:00:00 2001 From: paulmwatson Date: Wed, 11 Dec 2024 14:17:53 +0200 Subject: [PATCH] Fixed migrations --- .../migrations/0017_auto_20241211_1411.py | 27 +++++++++++++++++++ pombola/core/models.py | 2 +- 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 pombola/core/migrations/0017_auto_20241211_1411.py diff --git a/pombola/core/migrations/0017_auto_20241211_1411.py b/pombola/core/migrations/0017_auto_20241211_1411.py new file mode 100644 index 000000000..7decbdd83 --- /dev/null +++ b/pombola/core/migrations/0017_auto_20241211_1411.py @@ -0,0 +1,27 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.29 on 2024-12-11 14:11 +from __future__ import unicode_literals + +from django.db import migrations, models +import django.db.models.deletion +import sorl.thumbnail.fields + + +class Migration(migrations.Migration): + + dependencies = [ + ('contenttypes', '0002_remove_content_type_name'), + ('core', '0016_auto_20201119_0713'), + ] + + operations = [ + migrations.AlterModelOptions( + name='organisationhistory', + options={'ordering': ['date_changed'], 'verbose_name_plural': 'organisation histories'}, + ), + migrations.AlterField( + model_name='organisationhistory', + name='new_organisation', + field=models.ForeignKey(default=0, on_delete=django.db.models.deletion.CASCADE, related_name='org_history_new', to='core.Organisation'), + ) + ] diff --git a/pombola/core/models.py b/pombola/core/models.py index 433f05ce6..1e6b5d9df 100644 --- a/pombola/core/models.py +++ b/pombola/core/models.py @@ -1972,7 +1972,7 @@ def raw_query_with_prefetch(query_model, query, params, fields_prefetches): class OrganisationHistory(ModelBase): old_organisation = models.ForeignKey('Organisation', null=False, related_name='org_history_old') - new_organisation = models.ForeignKey('Organisation', null=False, related_name='org_history_new') + new_organisation = models.ForeignKey('Organisation', null=False, related_name='org_history_new', default=0) date_changed = DateField(null=False) class Meta: