# Generated by Django 4.2.11 on 2024-03-10 13:07

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


class Migration(migrations.Migration):

    dependencies = [
        ('endoreg_db', '0004_rename_hash_rawvideofile_video_hash'),
    ]

    operations = [
        migrations.CreateModel(
            name='FFMpegMeta',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('duration', models.FloatField(blank=True, null=True)),
                ('width', models.IntegerField(blank=True, null=True)),
                ('height', models.IntegerField(blank=True, null=True)),
                ('frame_rate', models.FloatField(blank=True, null=True)),
                ('video_codec', models.CharField(blank=True, max_length=50, null=True)),
                ('audio_codec', models.CharField(blank=True, max_length=50, null=True)),
                ('audio_channels', models.IntegerField(blank=True, null=True)),
                ('audio_sample_rate', models.IntegerField(blank=True, null=True)),
            ],
        ),
        migrations.RemoveField(
            model_name='videoimportmeta',
            name='center',
        ),
        migrations.RemoveField(
            model_name='videoimportmeta',
            name='endoscope',
        ),
        migrations.RemoveField(
            model_name='videoimportmeta',
            name='processor',
        ),
        migrations.CreateModel(
            name='VideoMeta',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('center', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='endoreg_db.center')),
                ('endoscope', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='endoreg_db.endoscope')),
                ('ffmpeg_meta', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='endoreg_db.ffmpegmeta')),
                ('import_meta', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='endoreg_db.videoimportmeta')),
                ('processor', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='endoreg_db.endoscopyprocessor')),
            ],
        ),
        migrations.AddField(
            model_name='rawvideofile',
            name='video_meta',
            field=models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='endoreg_db.videometa'),
        ),
    ]
