From 96bb6b5aafedd1bce881a341815d7da084bcab9c Mon Sep 17 00:00:00 2001 From: UsamaSadiq Date: Wed, 27 Sep 2023 17:41:38 +0500 Subject: [PATCH] feat: add new migrations due to simple-history package upgrade --- .../0018_alter_historicalsubsidy_options.py | 17 +++++++++++++++++ enterprise_subsidy/settings/base.py | 3 +++ 2 files changed, 20 insertions(+) create mode 100644 enterprise_subsidy/apps/subsidy/migrations/0018_alter_historicalsubsidy_options.py diff --git a/enterprise_subsidy/apps/subsidy/migrations/0018_alter_historicalsubsidy_options.py b/enterprise_subsidy/apps/subsidy/migrations/0018_alter_historicalsubsidy_options.py new file mode 100644 index 00000000..62184f6d --- /dev/null +++ b/enterprise_subsidy/apps/subsidy/migrations/0018_alter_historicalsubsidy_options.py @@ -0,0 +1,17 @@ +# Generated by Django 3.2.21 on 2023-09-27 12:41 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('subsidy', '0017_add_is_soft_deleted_subsidy'), + ] + + operations = [ + migrations.AlterModelOptions( + name='historicalsubsidy', + options={'get_latest_by': ('history_date', 'history_id'), 'ordering': ('-history_date', '-history_id'), 'verbose_name': 'historical subsidy', 'verbose_name_plural': 'historical subsidys'}, + ), + ] diff --git a/enterprise_subsidy/settings/base.py b/enterprise_subsidy/settings/base.py index 5c33e50d..a8cb3010 100644 --- a/enterprise_subsidy/settings/base.py +++ b/enterprise_subsidy/settings/base.py @@ -357,3 +357,6 @@ def root(*path_fragments): # per-view cache timeout settings # We can disable caching on this view by setting the value below to 0. CONTENT_METADATA_VIEW_CACHE_TIMEOUT_SECONDS = 60 + +# disable indexing on history_date +SIMPLE_HISTORY_DATE_INDEX = False