# 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 django.utils.timezone
import lara_django_base.models.models_sync_calendar
import mptt.fields
import uuid
from django.db import migrations, models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Country',
            fields=[
                ('country_id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('name', models.TextField(help_text='international name of the country', unique=True)),
                ('name_local', models.TextField(blank=True, help_text='local name of the country, e.g. Deutschland', unique=True)),
                ('alpha2code', models.CharField(blank=True, help_text='International 2-letter code, like DE, SE, DK ...', max_length=2, unique=True)),
                ('alpha3code', models.CharField(help_text='International 3-letter code, like DEU, USA, HEL ...', max_length=3, unique=True)),
                ('numeric_code', models.IntegerField(blank=True, help_text='International 3 number code, like 276 (for DEU)', null=True, unique=True)),
                ('phone_code', models.IntegerField(blank=True, help_text='International telephone code, like 49, 45, ...', null=True, unique=True)),
                ('icon', models.TextField(blank=True, help_text='XML/SVG icon / symbol / flag of the country')),
                ('iri', models.URLField(blank=True, help_text='International Resource Identifier - IRI: is used for semantic representation ', max_length=512, null=True, unique=True)),
                ('timezone', models.IntegerField(blank=True, help_text='time zone offset from UTC, e.g. 5, -3 ', null=True)),
                ('description', models.TextField(blank=True, help_text='description of the country')),
            ],
            options={
                'verbose_name_plural': 'Countries',
                'db_table_comment': 'Generic country representation class',
            },
        ),
        migrations.CreateModel(
            name='Currency',
            fields=[
                ('currency_id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('name', models.TextField(help_text='currency name', 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)),
                ('alpha3code', models.TextField(blank=True, help_text='acronym, e.g. EUR, USD, ..', unique=True)),
                ('numeric_code', models.IntegerField(blank=True, help_text='International 3 number code, like 978 (for EUR) ', null=True)),
                ('symbol', models.TextField(blank=True, help_text='currency symbol, e.g. €, $, ...')),
                ('exchange_rate_eur', models.DecimalField(blank=True, decimal_places=9, help_text='currency exchange rate to Euro ', max_digits=20, null=True)),
                ('datetime_last_modified', models.DateTimeField(default=django.utils.timezone.now, help_text='date and time when data was last modified')),
                ('description', models.TextField(blank=True, help_text='description of the currency')),
            ],
            options={
                'verbose_name_plural': 'Currencies',
                'db_table_comment': 'Generic currency class',
            },
        ),
        migrations.CreateModel(
            name='DataType',
            fields=[
                ('datatype_id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('name', models.TextField(db_index=True, help_text='name of the data type', unique=True)),
                ('iri', models.URLField(blank=True, help_text='International Resource Identifier - IRI: is used for semantic representation ', null=True, unique=True)),
                ('description', models.TextField(blank=True, help_text='description of extra data type')),
            ],
            options={
                'db_table_comment': 'Generic DataType that can be used to classify Data (s. below) e.g. email_home,email_lab, telephone_number_home1, company_x_customer_number, sequence data, absorption data ...',
                'ordering': ['name'],
            },
        ),
        migrations.CreateModel(
            name='ItemRole',
            fields=[
                ('itemrole_id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('role', models.TextField(db_index=True, help_text='item role, like sample, reference, standard, control, ..')),
                ('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='A short description of the item role')),
            ],
            options={
                'verbose_name_plural': 'ItemRoles',
                'db_table_comment': 'Generic item role/state, can be used for indicating the role of LARA items,like a containers or processes: sample, reference, standard, control, ...',
            },
        ),
        migrations.CreateModel(
            name='LocationType',
            fields=[
                ('locationtype_id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('name', models.TextField(help_text='location type name', 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 location type')),
            ],
            options={
                'verbose_name_plural': 'LocationTypes',
                'db_table_comment': 'Location type: e.g. shelf, drawer, box, container, device, ...',
            },
        ),
        migrations.CreateModel(
            name='Namespace',
            fields=[
                ('namespace_id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('uri', models.URLField(db_index=True, help_text='Universal Resource Identifier - A unique namespace for identifying data, https://de.unigreifswald/biochem/akb', unique=True)),
                ('description', models.TextField(blank=True, help_text='description of this Namespace')),
            ],
            options={
                'db_table_comment': 'Generic Namespace model: Namespaces can be used to specify the scope or provenience of data, entities, etc. and helps to make them unique.',
                'ordering': ['uri'],
            },
        ),
        migrations.CreateModel(
            name='PhysicalStateMatter',
            fields=[
                ('physicalstatematter_id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('name', models.TextField(help_text='physical state of matter, like solid, liquid, gas, plasma, ...')),
                ('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='A short description of the physical state of matter')),
            ],
            options={
                'verbose_name_plural': 'PhysicalStatesMatter',
                'db_table_comment': 'Physical state of matter, like solid, liquid, gas, plasma, ...',
            },
        ),
        migrations.CreateModel(
            name='PhysicalUnit',
            fields=[
                ('physicalunit_id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('name', models.TextField(help_text='physical unit, like meter, kilogram, ...')),
                ('symbol', models.TextField(blank=True, help_text='symbol of the physical unit, like m, kg, ...')),
                ('dimension', models.TextField(blank=True, help_text='physical dimension, like length, mass, ...')),
                ('transformation_si', models.JSONField(blank=True, help_text='transformation formula to SI unit, in machine readable form (e.g. python code), like: x * 1000.0', 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='A short description of the physical unit')),
            ],
            options={
                'db_table_comment': 'Physical units, like, meter, kilogram, ..., preferably SI units',
            },
        ),
        migrations.CreateModel(
            name='RoomCategory',
            fields=[
                ('roomcategory_id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('category', models.TextField(help_text='room category', 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='room category description')),
            ],
            options={
                'verbose_name_plural': 'RoomCategories',
                'db_table_comment': 'Room category: office, lab, lab_S1, lab_S2, ... seminar room',
            },
        ),
        migrations.CreateModel(
            name='SubdivisionType',
            fields=[
                ('subdivisiontype_id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('name', models.TextField(help_text='subdivision type, e.g. State, Province, Emirate, ... ', 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 subdivision type')),
            ],
            options={
                'db_table_comment': 'Country Subdivision Type: e.g. State, Province, Emirate, ...',
            },
        ),
        migrations.CreateModel(
            name='Tag',
            fields=[
                ('tag_id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('tag', models.TextField(db_index=True, help_text="a tag, can be used for tagging items, like 'reviewed', 'interesting', but also for keywords, like 'python', 'evolution'", 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)),
            ],
            options={
                'db_table_comment': 'Generic tags and keywords model: Tags and keywords can be usedto group related information or make objects findable.',
                'ordering': ['tag'],
            },
        ),
        migrations.CreateModel(
            name='CountrySubdivision',
            fields=[
                ('countrysubdivision_id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('name', models.TextField(blank=True, help_text='international name of the subdivision/federal state, Hessia, Thuringia, Baveria, ...')),
                ('name_local', models.TextField(blank=True, help_text='local name of the state, e.g. Hessen, Thüringen')),
                ('code', models.CharField(blank=True, help_text='multi-letter code, like US-MA, DE-TH ,  ...', max_length=16)),
                ('alpha2code', models.CharField(blank=True, help_text='2-letter code, like MA, BY, DK ...', max_length=3)),
                ('timezone', models.IntegerField(blank=True, help_text='time zone offset from UTC, e.g. 5, -3 ', 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 country subdivision')),
                ('country', models.ForeignKey(help_text='country', on_delete=django.db.models.deletion.CASCADE, related_name='%(app_label)s_%(class)s_countries_related', related_query_name='%(app_label)s_%(class)s_countries_related_query', to='lara_django_base.country')),
                ('subdivision_type', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='%(app_label)s_%(class)s_subdivision_types_related', related_query_name='%(app_label)s_%(class)s_subdivision_types_related_query', to='lara_django_base.subdivisiontype')),
            ],
            options={
                'db_table_comment': 'Generic country subdivision  to fit federal states,provinces, counties etc. into the same concept.',
            },
        ),
        migrations.CreateModel(
            name='City',
            fields=[
                ('city_id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('name', models.TextField(help_text='international name of the city, e.g. Munich')),
                ('name_local', models.TextField(blank=True, help_text='local name of the city, e.g. München')),
                ('timezone', models.IntegerField(blank=True, help_text='time zone offset from UTC, e.g. 5, -3 ', 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 city')),
                ('search_vector', django.contrib.postgres.search.SearchVectorField(null=True)),
                ('country', models.ForeignKey(help_text='country', null=True, on_delete=django.db.models.deletion.CASCADE, related_name='%(app_label)s_%(class)s_contries_related', related_query_name='%(app_label)s_%(class)s_countries_related_query', to='lara_django_base.country')),
                ('subdivision', models.ForeignKey(blank=True, help_text='country subdivision where the city is loacted', null=True, on_delete=django.db.models.deletion.CASCADE, related_name='%(app_label)s_%(class)s_subdivisions_related', related_query_name='%(app_label)s_%(class)s_subdivisions_related_query', to='lara_django_base.countrysubdivision')),
            ],
            options={
                'verbose_name_plural': 'Cities',
                'db_table_comment': 'Generic city representation class',
            },
        ),
        migrations.AddField(
            model_name='country',
            name='currency',
            field=models.ForeignKey(blank=True, help_text='currency', null=True, on_delete=django.db.models.deletion.CASCADE, related_name='%(app_label)s_%(class)s_currencies_related', related_query_name='%(app_label)s_%(class)s_currencies_related_query', to='lara_django_base.currency'),
        ),
        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='base')),
                ('image', models.ImageField(blank=True, help_text='location room map rel. path/filename to image', null=True, upload_to='base/images/')),
                ('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')),
            ],
            options={
                'verbose_name_plural': 'ExtraData',
                'db_table_comment': 'This class can be used to extend data, by extra information,e.g. more telephone numbers, customer numbers, ...',
            },
        ),
        migrations.CreateModel(
            name='GeoLocation',
            fields=[
                ('geolocation_id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('name', models.TextField(help_text='Unique location name', 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)),
                ('coordinates_dd_lat', models.DecimalField(decimal_places=24, help_text='in Decimal degrees (DD) - latitude, e.g., 54.0915068', max_digits=32)),
                ('coordinates_dd_long', models.DecimalField(decimal_places=24, help_text='in Decimal degrees (DD) - longitude, e.g., 13.4029247', max_digits=32)),
                ('elevation', models.IntegerField(blank=True, help_text='elevation in m above sea level', null=True)),
                ('openstreetmap', models.URLField(blank=True, help_text='OpenStreetMap (www.openstreetmap.org) link to address', max_length=1024)),
                ('googlemap', models.URLField(blank=True, help_text='google maps link to address', max_length=1024)),
                ('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 the geo location')),
                ('data_extra', models.ManyToManyField(blank=True, help_text='this can be used to extend the geo location: like maps to location etc.', 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_base.extradata')),
            ],
            options={
                'db_table_comment': 'Generic geo location information class to store geo location data,like Decimal Degrees of the location of, e.g. a building, a sample, etc. ...',
            },
        ),
        migrations.CreateModel(
            name='Address',
            fields=[
                ('address_id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('iri', models.URLField(blank=True, help_text='International Resource Identifier - IRI: is used for semantic representation ', max_length=512, null=True, unique=True)),
                ('building', models.TextField(blank=True, help_text='in case the institution is within a bigger complex/campus')),
                ('street', models.TextField(blank=True, help_text='street, excluding house number')),
                ('house_number', models.TextField(blank=True, help_text='house number')),
                ('supplement', models.TextField(blank=True, help_text='address supplement info to make it unique, like c/o, room/floor')),
                ('postal_code', models.TextField(blank=True, help_text='postal code / ZIP')),
                ('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 the address')),
                ('search_vector', django.contrib.postgres.search.SearchVectorField(null=True)),
                ('city', models.ForeignKey(blank=True, help_text='city', null=True, on_delete=django.db.models.deletion.CASCADE, related_name='%(app_label)s_%(class)s_cities_related', related_query_name='%(app_label)s_%(class)s_cities_related_query', to='lara_django_base.city')),
                ('country', models.ForeignKey(blank=True, help_text='country', null=True, on_delete=django.db.models.deletion.CASCADE, related_name='%(app_label)s_%(class)s_countries_related', related_query_name='%(app_label)s_%(class)s_countries_related_query', to='lara_django_base.country')),
                ('subdivision', models.ForeignKey(blank=True, help_text='e.g. federal state, like Thuringia or Alaska', null=True, on_delete=django.db.models.deletion.CASCADE, related_name='%(app_label)s_%(class)s_subdivisions_related', related_query_name='%(app_label)s_%(class)s_subdivisions_related_query', to='lara_django_base.countrysubdivision')),
                ('data_extra', models.ManyToManyField(blank=True, help_text='extra information to addresses', 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_base.extradata')),
                ('geolocation', models.ForeignKey(blank=True, help_text='Geographical location', null=True, on_delete=django.db.models.deletion.CASCADE, to='lara_django_base.geolocation')),
                ('namespace', models.ForeignKey(help_text='namespace of address', 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': 'Addresses',
                'db_table_comment': 'Generic Address class: this class can be used to store all kind of Addresses',
            },
        ),
        migrations.CreateModel(
            name='LARAExtension',
            fields=[
                ('laraextension_id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('name', models.TextField(help_text='name of the extension', unique=True)),
                ('url', models.URLField(blank=True, help_text='External URL of the extension')),
                ('icon', models.TextField(blank=True, help_text='SVG icon of the extension')),
                ('new_tab', models.BooleanField(default=False, help_text='open in new tab')),
                ('target_element', models.TextField(blank=True, help_text='target HTML element of the extension')),
                ('components', models.JSONField(blank=True, help_text='components / templates of the extension', null=True)),
                ('description', models.TextField(blank=True, help_text='description of the extension')),
                ('parent', models.ForeignKey(blank=True, help_text='parent extension for building a route / menu hierarchy', null=True, on_delete=django.db.models.deletion.CASCADE, related_name='%(app_label)s_%(class)s_parents_related', related_query_name='%(app_label)s_%(class)s_parents_related_query', to='lara_django_base.laraextension')),
            ],
            options={
                'db_table_comment': 'LARA UI extensions',
            },
        ),
        migrations.CreateModel(
            name='MediaType',
            fields=[
                ('mediatype_id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('name', models.TextField(help_text='name of the IANA application')),
                ('media_type', models.TextField(help_text="name of IANA/MIME media type in the format:\n                    type '/' [tree '.'] subtype ['+' suffix] *[';' parameter]", unique=True)),
                ('def_filename_extension_regex', models.TextField(blank=True, help_text='default filename extension regular expression,\n                     e.g. ^.*\\ .(jpg|JPG)$ ,  ^.*\\ .(gif|GIF|doc|DOC|pdf|PDF)$', unique=True)),
                ('iri', models.URLField(blank=True, help_text='International Resource Identifier - IRI: is used for semantic representation', null=True, unique=True)),
                ('description', models.TextField(blank=True, help_text='description of file type')),
            ],
            options={
                'db_table_comment': 'Generic media Type (IANA type/subtype) for media files, like, e.g., application/text, application/json, image/svg+xml, image/png, audio/mp3, application/pdf, ',
                'ordering': ['name'],
                'indexes': [models.Index(fields=['name', 'media_type'], name='name_media_type_idx')],
            },
        ),
        migrations.AddField(
            model_name='extradata',
            name='media_type',
            field=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'),
        ),
        migrations.AddField(
            model_name='datatype',
            name='media_type',
            field=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'),
        ),
        migrations.CreateModel(
            name='Location',
            fields=[
                ('location_id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('name', models.TextField(help_text='Unique location name', unique=True)),
                ('barcode', models.TextField(blank=True, help_text='text representation of a barcode of the location.', unique=True)),
                ('barcode_json', models.JSONField(blank=True, help_text='Advanced barcodes in JSON for multiple barcode representations, like QR codes etc.', null=True)),
                ('location_json', models.JSONField(blank=True, help_text='JSON field for advanced location specification - can be used to store, e.g. locations in a device', 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 this location to an external location')),
                ('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='location description')),
                ('search_vector', django.contrib.postgres.search.SearchVectorField(null=True)),
                ('lft', models.PositiveIntegerField(editable=False)),
                ('rght', models.PositiveIntegerField(editable=False)),
                ('tree_id', models.PositiveIntegerField(db_index=True, editable=False)),
                ('level', models.PositiveIntegerField(editable=False)),
                ('address', models.ForeignKey(blank=True, help_text='reference to an address', null=True, on_delete=django.db.models.deletion.CASCADE, related_name='%(app_label)s_%(class)s_addresses_related', related_query_name='%(app_label)s_%(class)s_addresses_related_query', to='lara_django_base.address')),
                ('data_extra', models.ManyToManyField(blank=True, help_text='like maps to location etc.', 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_base.extradata')),
                ('geolocation', models.ForeignKey(blank=True, help_text='geo location', null=True, on_delete=django.db.models.deletion.CASCADE, related_name='%(app_label)s_%(class)s_geolocations_related', related_query_name='%(app_label)s_%(class)s_geolocations_related_query', to='lara_django_base.geolocation')),
                ('parent', mptt.fields.TreeForeignKey(blank=True, help_text='mptt - parent projects', null=True, on_delete=django.db.models.deletion.CASCADE, related_name='%(app_label)s_%(class)s_experiment_parent_related', related_query_name='%(app_label)s_%(class)s_parent_related_query', to='lara_django_base.location')),
                ('location_type', models.ForeignKey(blank=True, help_text='location type, e.g. shelf, drawer, box, container, device, ...', null=True, on_delete=django.db.models.deletion.CASCADE, related_name='%(app_label)s_%(class)s_location_types_related', related_query_name='%(app_label)s_%(class)s_location_types_related_query', to='lara_django_base.locationtype')),
                ('namespace', models.ForeignKey(blank=True, help_text='namespace of location', null=True, 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={
                'db_table_comment': 'Physical location of objects like device, substances, organisms, containersetc., at concrete place, e.g., in shelf or drawer in a lab or room.',
            },
        ),
        migrations.AddField(
            model_name='extradata',
            name='namespace',
            field=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'),
        ),
        migrations.CreateModel(
            name='Room',
            fields=[
                ('room_id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('name', models.TextField(blank=True, help_text='name of the room - some rooms have names')),
                ('number', models.TextField(blank=True, help_text='room number')),
                ('floor', models.TextField(blank=True, help_text='Floor')),
                ('phone_number', models.TextField(blank=True, help_text='room phone number, if possible add the +Country code notation, e.g., +44 3834 420 4411')),
                ('room_map', models.ImageField(blank=True, help_text='location room map rel. path/filename to image', null=True, upload_to='people/rooms/')),
                ('max_people', models.IntegerField(blank=True, help_text='max number of people for this room', null=True)),
                ('area', models.DecimalField(blank=True, decimal_places=2, help_text='room area in square meters', max_digits=9, null=True)),
                ('volume', models.DecimalField(blank=True, decimal_places=2, help_text='room volume in cubic meters', max_digits=9, null=True)),
                ('features', models.JSONField(blank=True, help_text='features of this room, like sockets, lights, gas, furniture, infrastructure,...', 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='room description')),
                ('datetime_last_modified', models.DateTimeField(blank=True, help_text='date and time when data was last modified', null=True)),
                ('search_vector', django.contrib.postgres.search.SearchVectorField(null=True)),
                ('data_extra', models.ManyToManyField(blank=True, help_text='extra information for this room', related_name='%(app_label)s_%(class)s_room_data_extra_related', related_query_name='%(app_label)s_%(class)s_room_data_extra_related_query', to='lara_django_base.extradata')),
                ('namespace', models.ForeignKey(blank=True, help_text='namespace of room', null=True, 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')),
                ('category', models.ForeignKey(blank=True, help_text='room category', null=True, on_delete=django.db.models.deletion.CASCADE, related_name='%(app_label)s_%(class)s_categories_related', related_query_name='%(app_label)s_%(class)s_categories_related_query', to='lara_django_base.roomcategory')),
            ],
            options={
                'db_table_comment': 'Rooms and laboratories',
            },
        ),
        migrations.CreateModel(
            name='ScientificConstant',
            fields=[
                ('scientificconstant_id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('name', models.TextField(blank=True, help_text='generic text field')),
                ('symbol', models.TextField(blank=True, help_text='symbol of the constant')),
                ('value', models.FloatField(blank=True, help_text='Float value of the ', null=True)),
                ('uncertainty', models.FloatField(blank=True, help_text='uncertainty of the value +/-', null=True)),
                ('data_json', models.JSONField(blank=True, help_text='complex content', 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_source', models.URLField(blank=True, help_text='Universal Resource Locator - URL - source, e.g. in literature')),
                ('url_definition', models.URLField(blank=True, help_text='Universal Resource Locator - URL - definition')),
                ('description', models.TextField(blank=True, help_text='description of the constant')),
                ('datetime_last_modified', models.DateTimeField(blank=True, help_text='date and time when data was last modified', null=True)),
                ('search_vector', django.contrib.postgres.search.SearchVectorField(null=True)),
                ('unit', models.ForeignKey(blank=True, help_text='physical unit', null=True, on_delete=django.db.models.deletion.CASCADE, related_name='%(app_label)s_%(class)s_units_related', related_query_name='%(app_label)s_%(class)s_units_related_query', to='lara_django_base.physicalunit')),
            ],
            options={
                'db_table_comment': 'Mathematical and Physical constants',
            },
        ),
        migrations.CreateModel(
            name='LARASyncServer',
            fields=[
                ('laraserver_id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('name', models.TextField(blank=True, help_text='human readable name of the Sync server')),
                ('url', models.URLField(blank=True, help_text='Universal Resource Locator - URL of the LARA server')),
                ('port', models.IntegerField(blank=True, help_text='port of the LARA server', null=True)),
                ('server_type', models.CharField(choices=lara_django_base.models.models_sync_calendar._get_syncserver_types, default='LARA', help_text='type of server to be synchronised with', max_length=4)),
                ('connection_json', models.JSONField(blank=True, help_text='JSON field for more advanced connection information,e.g., advanced routing, ports, ..., could be even encrypted.', null=True)),
                ('auth_json', models.JSONField(blank=True, help_text='JSON field for authentication information, e.g. username, password, token, ..., could be even encrypted', null=True)),
                ('cert_pub', models.TextField(blank=True, help_text='server public certificate')),
                ('description', models.TextField(blank=True, help_text='server description')),
                ('tags', models.ManyToManyField(blank=True, help_text='tags LARA server', 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={
                'db_table_comment': 'LARA Server description, e.g., for synchronisation between two LARA instances',
            },
        ),
        migrations.CreateModel(
            name='ItemStatus',
            fields=[
                ('itemstatus_id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('status', models.TextField(db_index=True, help_text='item status, like planned, started, evaluating, .. finished')),
                ('iri', models.URLField(blank=True, help_text='International Resource Identifier - IRI: is used for semantic representation ', max_length=512, null=True, unique=True)),
                ('color', models.TextField(blank=True, help_text='colour scheme indicating the status of the item')),
                ('value', models.FloatField(blank=True, default=0.0, help_text='relative value between 0 and 1, indicating the status of the item')),
                ('description', models.TextField(blank=True, help_text='A short description of the item status')),
                ('tags', models.ManyToManyField(blank=True, help_text='tags for item status', 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={
                'verbose_name_plural': 'ItemStatus',
                'db_table_comment': 'Generic item status/state, can be used for indicating the status of LARA items,like a containers or processes: planned, started, evaluating or order states, like to_order,pending, ordered, received ...',
            },
        ),
        migrations.CreateModel(
            name='ExternalResource',
            fields=[
                ('externalresource_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 external resource')),
                ('name', models.TextField(blank=True, help_text='name of the external resource', unique=True)),
                ('url', models.URLField(blank=True, help_text='Universal Resource Locator - URL - this can be used to link the data to external locations')),
                ('iri', models.URLField(blank=True, help_text='Universal Resource Name - URI - this can be used to uniquely identify the external resource', unique=True)),
                ('prefix', models.TextField(blank=True, help_text="prefix for compact URIs (CURI), e.g. 'skos' for 'http://www.w3.org/2004/02/skos/core#'")),
                ('description', models.TextField(blank=True, help_text='description of the external resource')),
                ('datetime_last_modified', models.DateTimeField(blank=True, help_text='date and time when data was last modified', null=True)),
                ('search_vector', django.contrib.postgres.search.SearchVectorField(null=True)),
                ('resource_type', models.ForeignKey(blank=True, help_text='type of external resource, like pdf, website, handle, DOI, ...', null=True, on_delete=django.db.models.deletion.CASCADE, related_name='%(app_label)s_%(class)s_resource_type_related', to='lara_django_base.datatype')),
                ('namespace', models.ForeignKey(blank=True, help_text='namespace of external resource', null=True, 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')),
                ('tags', models.ManyToManyField(blank=True, help_text='tags for external resource', 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={
                'db_table_comment': 'Generic external resource class: External resources can be used to link to external resources, like e.g. literature, pdf, a website, a file, a database, ...',
            },
        ),
        migrations.AddIndex(
            model_name='city',
            index=django.contrib.postgres.indexes.GinIndex(fields=['search_vector'], name='lara_django_search__fd36db_gin'),
        ),
        migrations.AddConstraint(
            model_name='city',
            constraint=models.UniqueConstraint(fields=('name', 'country'), name='lara_django_base_city_name_country_unique'),
        ),
        migrations.AddIndex(
            model_name='location',
            index=django.contrib.postgres.indexes.GinIndex(fields=['search_vector'], name='lara_django_search__8a99cd_gin'),
        ),
        migrations.AddIndex(
            model_name='extradata',
            index=models.Index(fields=['name', 'namespace'], name='name_namespace_idx'),
        ),
        migrations.AddIndex(
            model_name='address',
            index=django.contrib.postgres.indexes.GinIndex(fields=['search_vector'], name='lara_django_search__fb5c51_gin'),
        ),
        migrations.AddIndex(
            model_name='address',
            index=models.Index(fields=['namespace', 'street', 'postal_code', 'city'], name='namespace_str_post_city_idx'),
        ),
        migrations.AddConstraint(
            model_name='address',
            constraint=models.UniqueConstraint(fields=('street', 'house_number', 'building', 'postal_code', 'city'), name='lara_django_base_address_street_house_number_building_postal_code_city_unique'),
        ),
        migrations.AddIndex(
            model_name='room',
            index=django.contrib.postgres.indexes.GinIndex(fields=['search_vector'], name='lara_django_search__8f9925_gin'),
        ),
        migrations.AddConstraint(
            model_name='room',
            constraint=models.UniqueConstraint(fields=('namespace', 'name', 'number', 'floor'), name='lara_django_base_room_namespace_name_number_floor_unique'),
        ),
        migrations.AddIndex(
            model_name='scientificconstant',
            index=django.contrib.postgres.indexes.GinIndex(fields=['search_vector'], name='lara_django_search__edcf2d_gin'),
        ),
        migrations.AddConstraint(
            model_name='countrysubdivision',
            constraint=models.UniqueConstraint(fields=('name', 'country'), name='lara_django_base_countrysubdivision_name_country_unique'),
        ),
        migrations.AddIndex(
            model_name='externalresource',
            index=models.Index(fields=['name', 'namespace'], name='ext_res_name_namespace_idx'),
        ),
        migrations.AddIndex(
            model_name='externalresource',
            index=django.contrib.postgres.indexes.GinIndex(fields=['search_vector'], name='lara_django_search__a70373_gin'),
        ),
    ]
