From b65ed606e7bacc21d6067b258fabb662079a2020 Mon Sep 17 00:00:00 2001 From: PCoder Date: Mon, 1 Nov 2021 09:43:51 +0530 Subject: [PATCH] Fix some constraint issues --- app/models.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/models.py b/app/models.py index a9c6e77..09cfa51 100644 --- a/app/models.py +++ b/app/models.py @@ -67,7 +67,7 @@ class Range(models.Model): name = models.TextField(blank=True, null=True) countries = models.TextField(blank=True, null=True) - range_name_map = models.TextField(blank=True, null=True) + range_name_map = models.TextField(blank=True, null=True, unique=True) range_name = models.TextField(blank=True, null=True) range_name_ascii = models.TextField(blank=True, null=True) range_name_language = models.TextField(blank=True, null=True) @@ -93,7 +93,7 @@ class Range(models.Model): source = models.TextField(blank=True, null=True) range_alternate_id = models.TextField(blank=True, null=True) geologic_region = models.TextField(blank=True, null=True) - gmba_v2_id = models.TextField(blank=True, null=True) + gmba_v2_id = models.TextField(blank=True, null=True, unique=True) gmba_v2_id_str = models.TextField(blank=True, null=True) wiki_data_id = models.TextField(blank=True, null=True) wiki_data_url = models.TextField(blank=True, null=True) @@ -458,7 +458,7 @@ class Person(models.Model): landscape = models.TextField(blank=True, null=True) regional = models.TextField(blank=True, null=True) national = models.TextField(blank=True, null=True) - global_ = models.TextField(blank=True, null=True) + _global = models.TextField(blank=True, null=True) geographic_area_of_expertise = models.TextField(blank=True, null=True) profile_on_web = models.TextField(blank=True, null=True) updated = models.TextField(blank=True, null=True) @@ -534,7 +534,7 @@ class ScalesPeople(models.Model): class Species(models.Model): id = models.AutoField(primary_key=True) scientific_name = models.TextField(blank=True, null=True) - class_ = models.TextField(blank=True, null=True) + _class = models.TextField(blank=True, null=True) english_name = models.TextField(blank=True, null=True) url = models.TextField(blank=True, null=True)