# Generated by Django 4.0.6 on 2024-01-29 22:27

from django.db import migrations, models
import django.db.models.deletion
import network.base.models


class Migration(migrations.Migration):

    dependencies = [
        ('base', '0108_alter_observation_options'),
    ]

    operations = [
        migrations.CreateModel(
            name='StationType',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=10, unique=True)),
            ],
        ),
        migrations.CreateModel(
            name='StationConfigurationSchema',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('schema', models.JSONField(default=network.base.models.get_default_station_configuration_schema)),
                ('station_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='base.stationtype')),
            ],
            options={
                'unique_together': {('name', 'station_type')},
            },
        ),
        migrations.CreateModel(
            name='StationConfiguration',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('configuration', models.JSONField(default=network.base.models.get_default_station_configuration)),
                ('active', models.BooleanField(default=True)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('schema', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='base.stationconfigurationschema')),
                ('station', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='base.station')),
            ],
        ),
        migrations.CreateModel(
            name='ActiveStationConfiguration',
            fields=[
            ],
            options={
                'proxy': True,
                'indexes': [],
                'constraints': [],
            },
            bases=('base.stationconfiguration',),
        ),
    ]
