# Generated by Django 5.2.3 on 2025-06-30 16:24

import django.contrib.postgres.indexes
import django.contrib.postgres.search
import django.db.models.deletion
import uuid
from django.db import migrations, models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('lara_django_base', '0001_initial'),
        ('lara_django_people', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Classis',
            fields=[
                ('classis_id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('name_display', models.TextField(help_text='human readable display name of the classis, can contain spaces')),
                ('name', models.TextField(blank=True, help_text='classis name, like ', null=True)),
                ('name_common', models.TextField(blank=True, help_text='common classis name, like ', null=True)),
                ('characteristics', models.JSONField(blank=True, help_text="generic characteristics of this classis, use 'traits' for specific traits.", null=True)),
                ('iri', models.URLField(blank=True, help_text='International Resource Identifier - IRI: is used for semantic representation ', max_length=512, null=True, unique=True)),
                ('description', models.TextField(blank=True, help_text='description of this classis', null=True)),
                ('datetime_last_modified', models.DateTimeField(blank=True, help_text='date and time when habitat parameter data was last modified', null=True)),
            ],
            options={
                'verbose_name_plural': 'Classes',
            },
        ),
        migrations.CreateModel(
            name='Cultivar',
            fields=[
                ('cultivar_id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('name_display', models.TextField(help_text='human readable display name of the cultivar, can contain spaces')),
                ('name', models.TextField(blank=True, help_text='cultivar name, like ', null=True)),
                ('name_common', models.TextField(blank=True, help_text='common cultivar name, like ', null=True)),
                ('characteristics', models.JSONField(blank=True, help_text="General characteristics of this cultivar, use 'traits' for specific traits.", null=True)),
                ('iri', models.URLField(blank=True, help_text='International Resource Identifier - IRI: is used for semantic representation ', max_length=512, null=True, unique=True)),
                ('description', models.TextField(blank=True, help_text='description of this cultivar', null=True)),
                ('datetime_last_modified', models.DateTimeField(blank=True, help_text='date and time when habitat parameter data was last modified', null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Domain',
            fields=[
                ('domain_id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('name_display', models.TextField(help_text='human readable display name of the domain, can contain spaces')),
                ('name', models.TextField(blank=True, help_text='domain name: Archaea, Bacteria, and Eukarya', null=True)),
                ('iri', models.URLField(blank=True, help_text='International Resource Identifier - IRI: is used for semantic representation ', max_length=512, null=True, unique=True)),
                ('characteristics', models.JSONField(blank=True, help_text="General characteristics of Domain. Use 'traits' for specific traits.", null=True)),
                ('description', models.TextField(blank=True, help_text='description of domain', null=True)),
                ('datetime_last_modified', models.DateTimeField(blank=True, help_text='date and time when habitat parameter data was last modified', null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Familia',
            fields=[
                ('familia_id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('name_display', models.TextField(help_text='human readable display name of the familia, can contain spaces')),
                ('name', models.TextField(blank=True, help_text='familia name, like ', null=True)),
                ('name_common', models.TextField(blank=True, help_text='common familia name, like ', null=True)),
                ('characteristics', models.JSONField(blank=True, help_text="Generic characteristics of this familia, use 'traits' for specific traits.", null=True)),
                ('iri', models.URLField(blank=True, help_text='International Resource Identifier - IRI: is used for semantic representation ', max_length=512, null=True, unique=True)),
                ('description', models.TextField(blank=True, help_text='description of this familia', null=True)),
                ('datetime_last_modified', models.DateTimeField(blank=True, help_text='date and time when habitat parameter data was last modified', null=True)),
            ],
            options={
                'verbose_name_plural': 'Familiae',
            },
        ),
        migrations.CreateModel(
            name='Genus',
            fields=[
                ('genus_id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('name_display', models.TextField(help_text='human readable display name of the genus, can contain spaces')),
                ('name', models.TextField(blank=True, help_text='genus name, like ', null=True)),
                ('name_common', models.TextField(blank=True, help_text='common genus name, like ', null=True)),
                ('characteristics', models.JSONField(blank=True, help_text="General characteristics of this genus, use 'traits' for specific traits.", null=True)),
                ('iri', models.URLField(blank=True, help_text='International Resource Identifier - IRI: is used for semantic representation ', max_length=512, null=True, unique=True)),
                ('description', models.TextField(blank=True, help_text='description of this genus', null=True)),
                ('datetime_last_modified', models.DateTimeField(blank=True, help_text='date and time when habitat parameter data was last modified', null=True)),
            ],
            options={
                'verbose_name_plural': 'Genera',
            },
        ),
        migrations.CreateModel(
            name='HabitatClass',
            fields=[
                ('habitatclass_id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('name', models.TextField(help_text='maritime, terrestrial, shore', unique=True)),
                ('iri', models.URLField(blank=True, help_text='International Resource Identifier - IRI: is used for semantic representation ', max_length=512, null=True, unique=True)),
                ('description', models.TextField(blank=True, help_text='description of the habitat class')),
            ],
            options={
                'verbose_name_plural': 'HabitatClasses',
            },
        ),
        migrations.CreateModel(
            name='Ordo',
            fields=[
                ('ordo_id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('name_display', models.TextField(help_text='human readable display name of the ordo, can contain spaces')),
                ('name', models.TextField(blank=True, help_text='ordo name, like ', null=True)),
                ('name_common', models.TextField(blank=True, help_text='common ordo name, like ', null=True)),
                ('characteristics', models.JSONField(blank=True, help_text="Generic characteristics of this ordo, use 'traits' for specific traits.", null=True)),
                ('iri', models.URLField(blank=True, help_text='International Resource Identifier - IRI: is used for semantic representation ', max_length=512, null=True, unique=True)),
                ('description', models.TextField(blank=True, help_text='description of this ordo', null=True)),
                ('datetime_last_modified', models.DateTimeField(blank=True, help_text='date and time when habitat parameter data was last modified', null=True)),
            ],
            options={
                'verbose_name_plural': 'Ordae',
            },
        ),
        migrations.CreateModel(
            name='Phylum',
            fields=[
                ('phylum_id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('name_display', models.TextField(help_text='human readable display name of the phylum, can contain spaces')),
                ('name', models.TextField(blank=True, help_text='phylum name, like ', null=True)),
                ('name_common', models.TextField(blank=True, help_text='common phylum name, like ', null=True)),
                ('characteristics', models.JSONField(blank=True, help_text="Generic characteristics of phylum. Use 'traits' for specific traits.", null=True)),
                ('iri', models.URLField(blank=True, help_text='International Resource Identifier - IRI: is used for semantic representation ', max_length=512, null=True, unique=True)),
                ('description', models.TextField(blank=True, help_text='description of phylum', null=True)),
                ('datetime_last_modified', models.DateTimeField(blank=True, help_text='date and time when habitat parameter data was last modified', null=True)),
            ],
            options={
                'verbose_name_plural': 'Phyla',
            },
        ),
        migrations.CreateModel(
            name='Regnum',
            fields=[
                ('regnum_id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('name_display', models.TextField(help_text='human readable display name of the regnum, can contain spaces')),
                ('name', models.TextField(blank=True, help_text='Regnum name, like Plantae, Fungi', null=True)),
                ('iri', models.URLField(blank=True, help_text='International Resource Identifier - IRI: is used for semantic representation ', max_length=512, null=True, unique=True)),
                ('characteristics', models.JSONField(blank=True, help_text="General characteristics of Regnum, use 'traits' for specific traits.", null=True)),
                ('description', models.TextField(blank=True, help_text='description of Regnum', null=True)),
                ('datetime_last_modified', models.DateTimeField(blank=True, help_text='date and time when habitat parameter data was last modified', null=True)),
            ],
            options={
                'verbose_name_plural': 'regna',
            },
        ),
        migrations.CreateModel(
            name='Species',
            fields=[
                ('species_id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('name_display', models.TextField(help_text='human readable display name of the species, can contain spaces')),
                ('name', models.TextField(blank=True, help_text='species name, like ', null=True)),
                ('name_common', models.TextField(blank=True, help_text='common species name, like ', null=True)),
                ('characteristics', models.JSONField(blank=True, help_text="General characteristics of this species, use 'traits' for specific traits.", null=True)),
                ('iri', models.URLField(blank=True, help_text='International Resource Identifier - IRI: is used for semantic representation ', max_length=512, null=True, unique=True)),
                ('description', models.TextField(blank=True, help_text='description of this species', null=True)),
                ('datetime_last_modified', models.DateTimeField(blank=True, help_text='date and time when habitat parameter data was last modified', null=True)),
            ],
            options={
                'verbose_name_plural': 'Speciae',
            },
        ),
        migrations.CreateModel(
            name='Subspecies',
            fields=[
                ('subspecies_id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('name_display', models.TextField(help_text='human readable display name of the subspecies, can contain spaces')),
                ('name', models.TextField(blank=True, help_text='subspecies name, like ', null=True)),
                ('name_common', models.TextField(blank=True, help_text='common subspecies name, like ', null=True)),
                ('characteristics', models.JSONField(blank=True, help_text="General characteristics of this subspecies, use 'traits' for specific traits.", null=True)),
                ('iri', models.URLField(blank=True, help_text='International Resource Identifier - IRI: is used for semantic representation ', max_length=512, null=True, unique=True)),
                ('description', models.TextField(blank=True, help_text='description of this subspecies', null=True)),
                ('datetime_last_modified', models.DateTimeField(blank=True, help_text='date and time when habitat parameter data was last modified', null=True)),
            ],
            options={
                'verbose_name_plural': 'Subspecieae',
            },
        ),
        migrations.CreateModel(
            name='ExtraData',
            fields=[
                ('extradata_id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('name_display', models.TextField(blank=True, help_text='Human readable display name or title of extra data')),
                ('name', models.TextField(blank=True, help_text='name of extra data')),
                ('name_full', models.TextField(blank=True, help_text='full name of extra data', unique=True)),
                ('version', models.TextField(blank=True, help_text='version of extra data')),
                ('hash_sha256', models.CharField(blank=True, default=None, help_text='SHA256 hash of all data (JSON and XML)', max_length=256, unique=True)),
                ('data_json', models.JSONField(blank=True, help_text='generic JSON field', null=True)),
                ('iri', models.URLField(blank=True, help_text='International Resource Identifier - IRI: is used for semantic representation ', max_length=512, null=True, unique=True)),
                ('url', models.URLField(blank=True, help_text='Universal Resource Locator - this can be used to link the data to external locations')),
                ('datetime_created', models.DateTimeField(blank=True, help_text='date and time when data was created', null=True)),
                ('datetime_last_modified', models.DateTimeField(blank=True, help_text='date and time when data was last modified', null=True)),
                ('description', models.TextField(blank=True, help_text='description of extra data')),
                ('search_vector', django.contrib.postgres.search.SearchVectorField(null=True)),
                ('file', models.FileField(blank=True, help_text='rel. path/filename', null=True, upload_to='organisms')),
                ('data_type', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='%(app_label)s_%(class)s_name_related', to='lara_django_base.datatype')),
                ('media_type', models.ForeignKey(blank=True, help_text='IANA media type of extra data file', null=True, on_delete=django.db.models.deletion.CASCADE, related_name='%(app_label)s_%(class)s_file_types_related', related_query_name='%(app_label)s_%(class)s_file_types_related_query', to='lara_django_base.mediatype')),
                ('namespace', models.ForeignKey(help_text='namespace of data', on_delete=django.db.models.deletion.CASCADE, related_name='%(app_label)s_%(class)s_namespaces_related', related_query_name='%(app_label)s_%(class)s_namespaces_related_query', to='lara_django_base.namespace')),
            ],
            options={
                'verbose_name_plural': 'ExtraData',
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='HabitatParameter',
            fields=[
                ('habitatparameter_id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('name_display', models.TextField(help_text='human readable display name of the habitat parameter, can contain spaces')),
                ('name', models.TextField(help_text='name of the habitat parameter, e.g. temperature, moisture, pH, ...', unique=True)),
                ('iri', models.URLField(blank=True, help_text='International Resource Identifier - IRI: is used for semantic representation ', max_length=512, null=True, unique=True)),
                ('value_range', models.JSONField(blank=True, help_text='range of values for this parameter, like min, max, average, ...', null=True)),
                ('description', models.TextField(blank=True, help_text='description of the habitat parameter', null=True)),
                ('datetime_last_modified', models.DateTimeField(blank=True, help_text='date and time when habitat parameter data was last modified', null=True)),
                ('data_extra', models.ManyToManyField(blank=True, help_text='e.g. more information about this particular parameter ...', related_name='%(app_label)s_%(class)s_data_extra_related', related_query_name='%(app_label)s_%(class)s_data_extra_related_query', to='lara_django_organisms.extradata')),
                ('unit', models.ForeignKey(blank=True, help_text='physical unit of the parameter, e.g. K, mol/L, ...', null=True, on_delete=django.db.models.deletion.CASCADE, related_name='%(app_label)s_%(class)s_unit_related', related_query_name='%(app_label)s_%(class)s_unit_related_query', to='lara_django_base.physicalunit')),
            ],
        ),
        migrations.CreateModel(
            name='Habitat',
            fields=[
                ('habitat_id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('name_display', models.TextField(help_text='human readable display name of the habitat, can contain spaces')),
                ('name', models.TextField(blank=True, help_text='habitat name with namespaces, like sea.shore, sea.deepsee, land.vulcan', null=True)),
                ('iri', models.URLField(blank=True, help_text='International Resource Identifier - IRI: is used for semantic representation ', max_length=512, null=True, unique=True)),
                ('description', models.TextField(blank=True, help_text='description of the habitat', null=True)),
                ('datetime_last_modified', models.DateTimeField(blank=True, help_text='date and time when habitat data was last modified', null=True)),
                ('habitat_class', models.ForeignKey(blank=True, help_text='class of the habitat, like maritime, terrestrial, shore, ...', null=True, on_delete=django.db.models.deletion.CASCADE, related_name='%(app_label)s_%(class)s_habitat_class_related', related_query_name='%(app_label)s_%(class)s_habitat_class_related_query', to='lara_django_organisms.habitatclass')),
                ('parameters', models.ManyToManyField(blank=True, help_text='e.g. more parameters, like nutrients, ...', related_name='%(app_label)s_%(class)s_parameters_related', related_query_name='%(app_label)s_%(class)s_parameters_related_query', to='lara_django_organisms.habitatparameter')),
            ],
        ),
        migrations.CreateModel(
            name='Organism',
            fields=[
                ('organism_id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('name_display', models.TextField(help_text='human readable display name of the organism, can contain spaces')),
                ('name', models.TextField(blank=True, help_text='organism name for referencing in code, should not contain whitespaces', null=True)),
                ('name_common', models.TextField(blank=True, help_text="common organism name, like 'elephant' ", null=True)),
                ('iri', models.URLField(blank=True, help_text='International Resource Identifier - IRI: is used for semantic representation ', max_length=512, null=True, unique=True)),
                ('pac_id', models.URLField(blank=True, help_text='Publicly Addressable Content IDentifier is a globally unique identifier that operates independently of a central registry.', null=True, unique=True)),
                ('characteristics', models.JSONField(blank=True, help_text="General characteristics of this variant, use 'traits' for specific traits.", null=True)),
                ('genome', models.URLField(blank=True, help_text="URL to organism's (reference) genome", max_length=512, null=True)),
                ('hybrid', models.BooleanField(default=False, help_text='Hybrid - organism with mixed genetic material like mule, liger/tigon, plant hybrids.')),
                ('chimera', models.BooleanField(default=False, help_text='Chimera - organisms with mixed cells from different species, like apple/pear tree.')),
                ('description', models.TextField(blank=True, help_text='description of the organism', null=True)),
                ('datetime_last_modified', models.DateTimeField(blank=True, help_text='date and time when organism data was last modified', null=True)),
                ('classis', models.ForeignKey(blank=True, help_text="organism's classis (class) name", null=True, on_delete=django.db.models.deletion.CASCADE, related_name='%(app_label)s_%(class)s_organism_classis_related', related_query_name='%(app_label)s_%(class)s_organism_classis', to='lara_django_organisms.classis')),
                ('cultivar', models.ForeignKey(blank=True, help_text="organism's cultivar name", null=True, on_delete=django.db.models.deletion.CASCADE, related_name='%(app_label)s_%(class)s_organism_cultivar_related', related_query_name='%(app_label)s_%(class)s_organism_cultivar', to='lara_django_organisms.cultivar')),
                ('data_extra', models.ManyToManyField(blank=True, help_text='organism related extra ', related_name='%(app_label)s_%(class)s_organism_extradata_related', related_query_name='%(app_label)s_%(class)s_organism_extradata', to='lara_django_organisms.extradata')),
                ('domain', models.ForeignKey(blank=True, help_text="organism's domain name", null=True, on_delete=django.db.models.deletion.CASCADE, related_name='%(app_label)s_%(class)s_organism_domain_related', related_query_name='%(app_label)s_%(class)s_organism_domain', to='lara_django_organisms.domain')),
                ('familia', models.ForeignKey(blank=True, help_text="organism's familia (family) name", null=True, on_delete=django.db.models.deletion.CASCADE, related_name='%(app_label)s_%(class)s_organism_familia_related', related_query_name='%(app_label)s_%(class)s_organism_familia', to='lara_django_organisms.familia')),
                ('genus', models.ForeignKey(blank=True, help_text="organism's genus name", null=True, on_delete=django.db.models.deletion.CASCADE, related_name='%(app_label)s_%(class)s_organism_genus_related', related_query_name='%(app_label)s_%(class)s_organism_genus', to='lara_django_organisms.genus')),
                ('habitats', models.ManyToManyField(blank=True, help_text="general organism's habitats", related_name='%(app_label)s_%(class)s_organism_habitat_related', related_query_name='%(app_label)s_%(class)s_organism_habitat', to='lara_django_organisms.habitat')),
                ('ordo', models.ForeignKey(blank=True, help_text="organism's ordo name", null=True, on_delete=django.db.models.deletion.CASCADE, related_name='%(app_label)s_%(class)s_organism_ordo_related', related_query_name='%(app_label)s_%(class)s_organism_ordo', to='lara_django_organisms.ordo')),
                ('organisms', models.ManyToManyField(blank=True, help_text='organisms involved in hybrid or chimera', related_query_name='%(app_label)s_%(class)s_organism_organisms', to='lara_django_organisms.organism')),
                ('tags', models.ManyToManyField(blank=True, help_text='organism related tags', related_name='%(app_label)s_%(class)s_organism_tags_related', related_query_name='%(app_label)s_%(class)s_organism_tags', to='lara_django_base.tag')),
                ('phylum', models.ForeignKey(blank=True, help_text="organism's phylum name", null=True, on_delete=django.db.models.deletion.CASCADE, related_name='%(app_label)s_%(class)s_organism_phylum_related', related_query_name='%(app_label)s_%(class)s_organism_phylum', to='lara_django_organisms.phylum')),
                ('regnum', models.ForeignKey(blank=True, help_text="organism's regnum name", null=True, on_delete=django.db.models.deletion.CASCADE, related_name='%(app_label)s_%(class)s_organism_regnum_related', related_query_name='%(app_label)s_%(class)s_organism_regnum', to='lara_django_organisms.regnum')),
                ('species', models.ForeignKey(blank=True, help_text="organism's species name", null=True, on_delete=django.db.models.deletion.CASCADE, related_name='%(app_label)s_%(class)s_organism_species_related', related_query_name='%(app_label)s_%(class)s_organism_species', to='lara_django_organisms.species')),
                ('subspecies', models.ForeignKey(blank=True, help_text="organism's subspecies name", null=True, on_delete=django.db.models.deletion.CASCADE, related_name='%(app_label)s_%(class)s_organism_subspecies_related', related_query_name='%(app_label)s_%(class)s_organism_subspecies', to='lara_django_organisms.subspecies')),
            ],
        ),
        migrations.CreateModel(
            name='OrderedOrganismsSubset',
            fields=[
                ('orderedorganismssubset_id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('order', models.IntegerField(help_text='order of organism in subset')),
                ('organism', models.ForeignKey(help_text='organism in the subset', on_delete=django.db.models.deletion.CASCADE, related_name='%(app_label)s_%(class)s_organism_related', related_query_name='%(app_label)s_%(class)s_organism', to='lara_django_organisms.organism')),
            ],
            options={
                'ordering': ('order',),
            },
        ),
        migrations.CreateModel(
            name='OrganismsSubset',
            fields=[
                ('name_display', models.TextField(blank=True, help_text='display name of the subset')),
                ('name', models.TextField(blank=True, help_text='name of the subset')),
                ('description', models.TextField(blank=True, help_text='description of the subset', null=True)),
                ('datetime_last_modified', models.DateTimeField(blank=True, help_text='datetime of last modification of the selection', null=True)),
                ('organismssubset_id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('entity', models.ForeignKey(blank=True, help_text='user who created the subset', on_delete=django.db.models.deletion.CASCADE, related_name='%(app_label)s_%(class)s_users_related', related_query_name='%(app_label)s_%(class)s_users_related_query', to='lara_django_people.entity')),
                ('group', models.ForeignKey(blank=True, help_text='group who created the subset', null=True, on_delete=django.db.models.deletion.CASCADE, related_name='%(app_label)s_%(class)s_groups_related', related_query_name='%(app_label)s_%(class)s_groups_related_query', to='lara_django_people.group')),
                ('namespace', models.ForeignKey(blank=True, help_text='namespace of the subset', on_delete=django.db.models.deletion.CASCADE, related_name='%(app_label)s_%(class)s_namespaces_related', related_query_name='%(app_label)s_%(class)s_namespaces_related_query', to='lara_django_base.namespace')),
                ('organisms', models.ManyToManyField(blank=True, help_text='organisms in this subset', related_name='%(app_label)s_%(class)s_organisms_related', related_query_name='%(app_label)s_%(class)s_organisms', through='lara_django_organisms.OrderedOrganismsSubset', to='lara_django_organisms.organism')),
                ('tags', models.ManyToManyField(blank=True, help_text='tags', related_name='%(app_label)s_%(class)s_tags_related', related_query_name='%(app_label)s_%(class)s_tags_related_query', to='lara_django_base.tag')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.AddField(
            model_name='orderedorganismssubset',
            name='organisms_subset',
            field=models.ForeignKey(help_text='subset of organisms', on_delete=django.db.models.deletion.CASCADE, related_name='%(app_label)s_%(class)s_organismssubset_related', related_query_name='%(app_label)s_%(class)s_organismssubset', to='lara_django_organisms.organismssubset'),
        ),
        migrations.CreateModel(
            name='Trait',
            fields=[
                ('trait_id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('name_display', models.TextField(help_text='human readable display name of the trait, can contain spaces')),
                ('name', models.TextField(help_text='Name of the trait / feature attribute of the organisms, like branched, round, oval, .. staining, genetic fingerprint sequence ', unique=True)),
                ('value_range', models.JSONField(blank=True, help_text='range of values for this trait, like min, max, average, ...', null=True)),
                ('characteristics', models.JSONField(blank=True, help_text='characteristics of this trait', null=True)),
                ('iri', models.URLField(blank=True, help_text='International Resource Identifier - IRI: is used for semantic representation ', max_length=512, null=True, unique=True)),
                ('description', models.TextField(blank=True, help_text='description of the feature class', null=True)),
                ('datetime_last_modified', models.DateTimeField(blank=True, help_text='date and time when trait data was last modified', null=True)),
                ('unit', models.ForeignKey(blank=True, help_text='physical unit of the parameter, e.g. m, m^2, V, ...', null=True, on_delete=django.db.models.deletion.CASCADE, related_name='%(app_label)s_%(class)s_unit_related', related_query_name='%(app_label)s_%(class)s_unit_related_query', to='lara_django_base.physicalunit')),
            ],
            options={
                'verbose_name_plural': 'FeatureClasses',
            },
        ),
        migrations.AddField(
            model_name='subspecies',
            name='traits',
            field=models.ManyToManyField(blank=True, help_text="General subspecies's traits / features / attributes", related_name='%(app_label)s_%(class)s_subspecies_traits_related', related_query_name='%(app_label)s_%(class)s_subspecies_traits', to='lara_django_organisms.trait'),
        ),
        migrations.AddField(
            model_name='species',
            name='traits',
            field=models.ManyToManyField(blank=True, help_text="General species's traits / features / attributes", related_name='%(app_label)s_%(class)s_species_traits_related', related_query_name='%(app_label)s_%(class)s_species_traits', to='lara_django_organisms.trait'),
        ),
        migrations.AddField(
            model_name='regnum',
            name='traits',
            field=models.ManyToManyField(blank=True, help_text="General regnum's traits / features / attributes", related_name='%(app_label)s_%(class)s_regnum_traits_related', related_query_name='%(app_label)s_%(class)s_regnum_traits', to='lara_django_organisms.trait'),
        ),
        migrations.AddField(
            model_name='phylum',
            name='traits',
            field=models.ManyToManyField(blank=True, help_text="General phylum's traits / features / attributes", related_name='%(app_label)s_%(class)s_phylum_traits_related', related_query_name='%(app_label)s_%(class)s_phylum_traits', to='lara_django_organisms.trait'),
        ),
        migrations.AddField(
            model_name='organism',
            name='traits',
            field=models.ManyToManyField(blank=True, help_text="general organism's traits / features / attributes", related_name='%(app_label)s_%(class)s_organism_traits_related', related_query_name='%(app_label)s_%(class)s_organism_traits', to='lara_django_organisms.trait'),
        ),
        migrations.AddField(
            model_name='ordo',
            name='traits',
            field=models.ManyToManyField(blank=True, help_text="General ordo's traits / features / attributes", related_name='%(app_label)s_%(class)s_ordo_traits_related', related_query_name='%(app_label)s_%(class)s_ordo_traits', to='lara_django_organisms.trait'),
        ),
        migrations.AddField(
            model_name='genus',
            name='traits',
            field=models.ManyToManyField(blank=True, help_text="General genus's traits / features / attributes", related_name='%(app_label)s_%(class)s_genus_traits_related', related_query_name='%(app_label)s_%(class)s_genus_traits', to='lara_django_organisms.trait'),
        ),
        migrations.AddField(
            model_name='familia',
            name='traits',
            field=models.ManyToManyField(blank=True, help_text="General familia's traits / features / attributes", related_name='%(app_label)s_%(class)s_familia_traits_related', related_query_name='%(app_label)s_%(class)s_familia_traits', to='lara_django_organisms.trait'),
        ),
        migrations.AddField(
            model_name='domain',
            name='traits',
            field=models.ManyToManyField(blank=True, help_text="General domain's traits / features / attributes", related_name='%(app_label)s_%(class)s_domain_traits_related', related_query_name='%(app_label)s_%(class)s_domain_traits', to='lara_django_organisms.trait'),
        ),
        migrations.AddField(
            model_name='cultivar',
            name='traits',
            field=models.ManyToManyField(blank=True, help_text="General cultivar's traits / features / attributes", related_name='%(app_label)s_%(class)s_cultivar_traits_related', related_query_name='%(app_label)s_%(class)s_cultivar_traits', to='lara_django_organisms.trait'),
        ),
        migrations.AddField(
            model_name='classis',
            name='traits',
            field=models.ManyToManyField(blank=True, help_text="General classis's traits / features / attributes", related_name='%(app_label)s_%(class)s_classis_traits_related', related_query_name='%(app_label)s_%(class)s_classis_traits', to='lara_django_organisms.trait'),
        ),
        migrations.CreateModel(
            name='Variant',
            fields=[
                ('variant_id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('name_display', models.TextField(help_text='human readable display name of the variant, can contain spaces')),
                ('name', models.TextField(blank=True, help_text='variant name, like ', null=True)),
                ('name_common', models.TextField(blank=True, help_text='common variant name, like ', null=True)),
                ('characteristics', models.JSONField(blank=True, help_text="General characteristics of this variant, use 'traits' for specific traits.", null=True)),
                ('iri', models.URLField(blank=True, help_text='International Resource Identifier - IRI: is used for semantic representation ', max_length=512, null=True, unique=True)),
                ('description', models.TextField(blank=True, help_text='description of this variant', null=True)),
                ('datetime_last_modified', models.DateTimeField(blank=True, help_text='date and time when habitat parameter data was last modified', null=True)),
                ('traits', models.ManyToManyField(blank=True, help_text="General variant's traits / features / attributes", related_name='%(app_label)s_%(class)s_variant_traits_related', related_query_name='%(app_label)s_%(class)s_variant_traits', to='lara_django_organisms.trait')),
            ],
        ),
        migrations.AddField(
            model_name='organism',
            name='variant',
            field=models.ForeignKey(blank=True, help_text="organism's varian name", null=True, on_delete=django.db.models.deletion.CASCADE, related_name='%(app_label)s_%(class)s_organism_variant_related', related_query_name='%(app_label)s_%(class)s_organism_variant', to='lara_django_organisms.variant'),
        ),
        migrations.AddIndex(
            model_name='extradata',
            index=django.contrib.postgres.indexes.GinIndex(fields=['search_vector'], name='lara_django_search__a52661_gin'),
        ),
        migrations.AddConstraint(
            model_name='extradata',
            constraint=models.UniqueConstraint(fields=('name', 'namespace', 'version'), name='lara_django_organisms_extradata_name_namespace_version_unique'),
        ),
        migrations.AddConstraint(
            model_name='organismssubset',
            constraint=models.UniqueConstraint(fields=('name', 'namespace'), name='lara_django_organisms_organismssubset_unique_name_namespace'),
        ),
        migrations.AddConstraint(
            model_name='orderedorganismssubset',
            constraint=models.UniqueConstraint(fields=('organism', 'organisms_subset'), name='lara_django_organisms_orderedorganismssubset_organisms_organisms_subset_unique'),
        ),
        migrations.AddConstraint(
            model_name='organism',
            constraint=models.UniqueConstraint(fields=('name', 'genus', 'species', 'subspecies', 'variant', 'cultivar'), name='unique_organism'),
        ),
    ]
