From 065c44e0ce27af6e9561db02a9a1dbfb7c17acec Mon Sep 17 00:00:00 2001 From: jjmurre Date: Wed, 10 Jan 2024 16:59:23 +0100 Subject: [PATCH] AB#91450 Add column to dataset to configure exporting data. --- CHANGES.md | 5 +++++ setup.cfg | 2 +- .../migrations/0017_dataset_enable_export.py | 17 +++++++++++++++++ src/schematools/contrib/django/models.py | 1 + 4 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 src/schematools/contrib/django/migrations/0017_dataset_enable_export.py diff --git a/CHANGES.md b/CHANGES.md index 9c6f347c..4c15eacd 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,8 @@ +# 2024-01-10 (5.22.0) + +* Add `enable_export` column to the `dataset` model to be able + to configure the exports per dataset. + # 2024-01-08 (5.21.2) * Remove the Django >= 4.2 pinning, because DSO is still on Django 3.x. diff --git a/setup.cfg b/setup.cfg index 8c920815..f5a5df42 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = amsterdam-schema-tools -version = 5.21.2 +version = 5.22.0 url = https://github.com/amsterdam/schema-tools license = Mozilla Public 2.0 author = Team Data Diensten, van het Dataplatform onder de Directie Digitale Voorzieningen (Gemeente Amsterdam) diff --git a/src/schematools/contrib/django/migrations/0017_dataset_enable_export.py b/src/schematools/contrib/django/migrations/0017_dataset_enable_export.py new file mode 100644 index 00000000..074fe216 --- /dev/null +++ b/src/schematools/contrib/django/migrations/0017_dataset_enable_export.py @@ -0,0 +1,17 @@ +# Generated by Django 4.1.7 on 2024-01-10 16:59 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("datasets", "0016_dataset_view_data"), + ] + + operations = [ + migrations.AddField( + model_name="dataset", + name="enable_export", + field=models.BooleanField(default=False), + ), + ] diff --git a/src/schematools/contrib/django/models.py b/src/schematools/contrib/django/models.py index c2a41e88..a3702f99 100644 --- a/src/schematools/contrib/django/models.py +++ b/src/schematools/contrib/django/models.py @@ -161,6 +161,7 @@ class Dataset(models.Model): # Settings for publishing the schema: enable_api = models.BooleanField(default=True) enable_db = models.BooleanField(default=True) + enable_export = models.BooleanField(default=False) endpoint_url = models.URLField(blank=True, null=True) path = models.TextField(unique=True, blank=False, validators=[URLPathValidator()]) auth = models.CharField(_("Authorization"), blank=True, null=True, max_length=250)