diff --git a/qgis-app/plugins/migrations/0011_alter_pluginversiondownload_unique_together.py b/qgis-app/plugins/migrations/0011_alter_pluginversiondownload_unique_together.py new file mode 100644 index 00000000..fbd85028 --- /dev/null +++ b/qgis-app/plugins/migrations/0011_alter_pluginversiondownload_unique_together.py @@ -0,0 +1,17 @@ +# Generated by Django 4.2.13 on 2024-05-28 06:47 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('plugins', '0010_merge_20240517_0729'), + ] + + operations = [ + migrations.AlterUniqueTogether( + name='pluginversiondownload', + unique_together={('plugin_version', 'download_date', 'country_code', 'country_name')}, + ), + ] diff --git a/qgis-app/plugins/models.py b/qgis-app/plugins/models.py index 90245e85..aedfd35c 100644 --- a/qgis-app/plugins/models.py +++ b/qgis-app/plugins/models.py @@ -951,7 +951,9 @@ class PluginVersionDownload(models.Model): class Meta: unique_together = ( 'plugin_version', - 'download_date' + 'download_date', + 'country_code', + 'country_name' )