diff --git a/backend/apps/api/v1/migrations/0051_add_dataset_new_urlfield.py b/backend/apps/api/v1/migrations/0051_add_dataset_new_urlfield.py new file mode 100644 index 00000000..e303c87b --- /dev/null +++ b/backend/apps/api/v1/migrations/0051_add_dataset_new_urlfield.py @@ -0,0 +1,18 @@ +# Generated by Django 4.2.16 on 2024-11-13 01:13 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('v1', '0050_table_is_deprecated'), + ] + + operations = [ + migrations.AddField( + model_name='dataset', + name='link_url', + field=models.URLField(blank=True, null=True, verbose_name='Link') + ), + ] diff --git a/backend/apps/api/v1/migrations/0051_add_textfield_all_models.py b/backend/apps/api/v1/migrations/0051_add_textfield_all_models.py deleted file mode 100644 index 68484ac9..00000000 --- a/backend/apps/api/v1/migrations/0051_add_textfield_all_models.py +++ /dev/null @@ -1,21 +0,0 @@ -# Generated by Django 4.2.16 on 2024-11-12 15:34 - -from django.db import migrations, models - -def add_new_field_to_all_tables(apps, schema_editor): - for model in apps.get_models(): - schema_editor.add_field( - model, - name='url_links', - field=models.TextField(max_length=255, default='', blank=True) - ) - -class Migration(migrations.Migration): - - dependencies = [ - ('v1', '0050_table_is_deprecated'), - ] - - operations = [ - migrations.RunPython(add_new_field_to_all_tables), - ] diff --git a/backend/apps/api/v1/models.py b/backend/apps/api/v1/models.py index c3233ddf..2ab0d83b 100644 --- a/backend/apps/api/v1/models.py +++ b/backend/apps/api/v1/models.py @@ -545,6 +545,7 @@ class Dataset(BaseModel): default=0, help_text="Number of page views by Google Analytics", ) + link_url = models.URLField(blank=True, null=True, verbose_name='Link') graphql_nested_filter_fields_whitelist = ["id", "slug"]