From 8c4b1d80f525039fda8214dc81fe21b585a68b1e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Herv=C3=A9=20=20MENAGER?= <herve.menager@pasteur.fr>
Date: Tue, 2 Jul 2019 11:06:10 +0200
Subject: [PATCH] remove gene_name unique constraint from Protein model

fix #74
---
 .../migrations/0030_auto_20190702_0905.py      | 18 ++++++++++++++++++
 ippisite/ippidb/models.py                      |  4 ++--
 2 files changed, 20 insertions(+), 2 deletions(-)
 create mode 100644 ippisite/ippidb/migrations/0030_auto_20190702_0905.py

diff --git a/ippisite/ippidb/migrations/0030_auto_20190702_0905.py b/ippisite/ippidb/migrations/0030_auto_20190702_0905.py
new file mode 100644
index 00000000..0e4007a4
--- /dev/null
+++ b/ippisite/ippidb/migrations/0030_auto_20190702_0905.py
@@ -0,0 +1,18 @@
+# Generated by Django 2.2.1 on 2019-07-02 09:05
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('ippidb', '0029_auto_20190605_0606'),
+    ]
+
+    operations = [
+        migrations.AlterField(
+            model_name='protein',
+            name='gene_name',
+            field=models.CharField(max_length=30, verbose_name='Gene name'),
+        ),
+    ]
diff --git a/ippisite/ippidb/models.py b/ippisite/ippidb/models.py
index 429dc911..b167850e 100644
--- a/ippisite/ippidb/models.py
+++ b/ippisite/ippidb/models.py
@@ -221,7 +221,7 @@ class Protein(AutoFillableModel):
     recommended_name_long = models.CharField(
         'Uniprot Recommended Name (long)', max_length=75)
     short_name = models.CharField('Short name', max_length=50)
-    gene_name = models.CharField('Gene name', unique=True, max_length=30)
+    gene_name = models.CharField('Gene name', max_length=30)
     entry_name = models.CharField('Entry name', max_length=30)
     organism = models.ForeignKey('Taxonomy', models.CASCADE)
     molecular_functions = models.ManyToManyField(MolecularFunction)
@@ -1568,4 +1568,4 @@ def update_compound_cached_properties():
                 _lipinsky=Case(When(lipinsky_score__gte=3, then=True), default=False, output_field=BooleanField())
             ).values('_lipinsky')[:1]
         ),        
-    )
\ No newline at end of file
+    )
-- 
GitLab