From 5b5ec81a3c07b6836fe576892d14383643dfc00d Mon Sep 17 00:00:00 2001 From: zethson Date: Fri, 20 Sep 2024 13:09:55 +0200 Subject: [PATCH] :sparkles: Add chembl ID to Compound Signed-off-by: zethson --- wetlab/migrations/0024_compound_chembl_id.py | 19 +++++++++++++++++++ wetlab/models.py | 4 ++++ 2 files changed, 23 insertions(+) create mode 100644 wetlab/migrations/0024_compound_chembl_id.py diff --git a/wetlab/migrations/0024_compound_chembl_id.py b/wetlab/migrations/0024_compound_chembl_id.py new file mode 100644 index 0000000..8cf6e5b --- /dev/null +++ b/wetlab/migrations/0024_compound_chembl_id.py @@ -0,0 +1,19 @@ +# Generated by Django 5.0.3 on 2024-09-20 11:08 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("wetlab", "0023_compoundtreatment_duration_and_more"), + ] + + operations = [ + migrations.AddField( + model_name="compound", + name="chembl_id", + field=models.CharField( + db_index=True, default=None, max_length=32, null=True + ), + ), + ] diff --git a/wetlab/models.py b/wetlab/models.py index 76f60cb..d10eebb 100644 --- a/wetlab/models.py +++ b/wetlab/models.py @@ -62,6 +62,10 @@ class Meta(BioRecord.Meta, TracksRun.Meta, TracksUpdates.Meta): max_length=32, db_index=True, null=True, default=None ) """Ontology ID of the compound.""" + chembl_id: str | None = models.CharField( + max_length=32, db_index=True, null=True, default=None + ) + """Chembl ontology ID of the compound""" abbr: str | None = models.CharField( max_length=32, db_index=True, unique=True, null=True, default=None )