Skip to content

Commit

Permalink
Change ref and alt field types
Browse files Browse the repository at this point in the history
in Variant model
  • Loading branch information
marcellevstek committed Nov 5, 2024
1 parent 4297a2d commit b21e4eb
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 4 deletions.
1 change: 1 addition & 0 deletions docs/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Added

Changed
-------
- Change ref and alt field types in Variant model

Fixed
-----
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Generated by Django 4.2.13 on 2024-11-05 12:55

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
(
"resolwe_bio_variants",
"0007_alter_variant_alternative_alter_variant_reference",
),
]

operations = [
migrations.AlterField(
model_name="variant",
name="alternative",
field=models.TextField(),
),
migrations.AlterField(
model_name="variant",
name="reference",
field=models.TextField(),
),
]
6 changes: 2 additions & 4 deletions resolwe_bio/variants/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
SPECIES_MAX_LENGTH = 50
GENOME_ASSEMBLY_MAX_LENGTH = 20
CHROMOSOME_MAX_LENGTH = 20
REFERENCE_MAX_LENGTH = 150
ALTERNATIVE_MAX_LENGTH = 150

# Metadata
VARIANT_DATA_SOURCE_MAX_LENGTH = 100
Expand Down Expand Up @@ -66,10 +64,10 @@ class Variant(AuditModel):
position = models.PositiveBigIntegerField()

#: reference
reference = models.CharField(max_length=REFERENCE_MAX_LENGTH)
reference = models.TextField()

#: alternative
alternative = models.CharField(max_length=ALTERNATIVE_MAX_LENGTH)
alternative = models.TextField()

class Meta:
"""Add constraint for composite key."""
Expand Down

0 comments on commit b21e4eb

Please sign in to comment.