# Generated by Django 4.0.6 on 2023-01-24 15:36

import db.base.models
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('base', '0055_remove_telemetry_schema'),
    ]

    operations = [
        migrations.CreateModel(
            name='OpticalObservation',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('diagnostic_plot', models.ImageField(upload_to=db.base.models._name_diagnostic_plot)),
                ('data', models.JSONField()),
                ('start', models.DateTimeField()),
                ('station_id', models.PositiveBigIntegerField()),
                ('uploader', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'unique_together': {('start', 'station_id')},
            },
        ),
        migrations.CreateModel(
            name='OpticalIdentification',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('norad_id', models.PositiveIntegerField(blank=True, null=True)),
                ('observation', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='identifications', to='base.opticalobservation')),
                ('satellite', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='base.satellite')),
            ],
        ),
    ]
