# Generated by Django 3.1.7 on 2021-03-06 09:45

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='BodyDetectionType',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('type', models.CharField(max_length=100)),
            ],
            options={
                'db_table': 'body_detection_type',
            },
        ),
        migrations.CreateModel(
            name='MassDetectionType',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('type', models.CharField(max_length=100)),
            ],
            options={
                'db_table': 'mass_detection_type',
            },
        ),
        migrations.CreateModel(
            name='Planet',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255)),
                ('status', models.CharField(choices=[('CONFIRMED', 'Confirmed'), ('CANDIDATE', 'Candidate'), ('RETRACTED', 'Retracted'), ('CONTROVERSIAL', 'Controversial')], default='CANDIDATE', max_length=13)),
                ('mass', models.FloatField(blank=True, null=True)),
                ('mass_sini', models.FloatField(blank=True, null=True)),
                ('radius', models.FloatField(blank=True, null=True)),
                ('orbital_periof', models.FloatField(blank=True, null=True)),
                ('semi_major_axis', models.FloatField(blank=True, null=True)),
                ('eccentricity', models.FloatField(blank=True, null=True)),
                ('inclination', models.FloatField(blank=True, null=True)),
                ('angular_distance', models.FloatField(blank=True, null=True)),
                ('discovered_year', models.PositiveIntegerField(validators=[exoplanet.models.planet.Planet._year_validator])),
                ('updated_date', models.DateField(auto_now=True)),
                ('omega', models.FloatField(blank=True, null=True)),
                ('tperi', models.FloatField(blank=True, null=True)),
                ('tconj', models.FloatField(blank=True, null=True)),
                ('tzero_tr', models.FloatField(blank=True, null=True)),
                ('tzero_tr_sec', models.FloatField(blank=True, null=True)),
                ('lambda_angle', models.FloatField(blank=True, null=True)),
                ('impact_parameter', models.FloatField(blank=True, null=True)),
                ('tzero_vr', models.FloatField(blank=True, null=True)),
                ('k', models.FloatField(blank=True, null=True)),
                ('temp_calculated', models.IntegerField(blank=True, null=True)),
                ('temp_measured', models.IntegerField(blank=True, null=True)),
                ('hot_point_lon', models.FloatField(blank=True, null=True)),
                ('geometric_albedo', models.FloatField(blank=True, null=True)),
                ('log_g', models.FloatField(blank=True, null=True)),
                ('body_detection_type', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='exoplanet.bodydetectiontype')),
                ('mass_detection_type', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='exoplanet.massdetectiontype')),
            ],
            options={
                'db_table': 'planet',
            },
        ),
        migrations.CreateModel(
            name='Publication',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('support', models.CharField(max_length=255)),
            ],
            options={
                'db_table': 'publication',
            },
        ),
        migrations.CreateModel(
            name='RadiusDetectionType',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('type', models.CharField(max_length=100)),
            ],
            options={
                'db_table': 'radius_detection_type',
            },
        ),
        migrations.CreateModel(
            name='Star',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255)),
                ('right_ascension', models.FloatField(blank=True, null=True)),
                ('declination', models.FloatField(blank=True, null=True)),
                ('mag_v', models.FloatField(blank=True, null=True)),
                ('mag_i', models.FloatField(blank=True, null=True)),
                ('mag_j', models.FloatField(blank=True, null=True)),
                ('mag_h', models.FloatField(blank=True, null=True)),
                ('mag_k', models.FloatField(blank=True, null=True)),
                ('distance', models.FloatField(blank=True, null=True)),
                ('metallicity', models.FloatField(blank=True, null=True)),
                ('mass', models.FloatField(blank=True, null=True)),
                ('radius', models.FloatField(blank=True, null=True)),
                ('age', models.FloatField(blank=True, null=True)),
                ('temp_effective', models.FloatField(blank=True, null=True)),
                ('has_magnetic_field', models.BooleanField(blank=True, null=True)),
                ('body_detection_type', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='exoplanet.bodydetectiontype')),
            ],
            options={
                'db_table': 'star',
            },
        ),
        migrations.CreateModel(
            name='StarAlternateName',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255)),
                ('star', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='exoplanet.star')),
            ],
            options={
                'db_table': 'star_alternate_name',
            },
        ),
        migrations.CreateModel(
            name='SpectralType',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('type', models.CharField(max_length=100)),
                ('stars', models.ManyToManyField(to='exoplanet.Star')),
            ],
            options={
                'db_table': 'spectral_type',
            },
        ),
        migrations.CreateModel(
            name='PlanetAlternateName',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255)),
                ('planet', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='exoplanet.planet')),
            ],
            options={
                'db_table': 'planet_alternate_name',
            },
        ),
        migrations.AddField(
            model_name='planet',
            name='publication',
            field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='exoplanet.publication'),
        ),
        migrations.AddField(
            model_name='planet',
            name='radius_detection_type',
            field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='exoplanet.radiusdetectiontype'),
        ),
        migrations.AddField(
            model_name='planet',
            name='star',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='exoplanet.star'),
        ),
        migrations.CreateModel(
            name='Modecule',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('structure', models.CharField(max_length=100)),
                ('planets', models.ManyToManyField(to='exoplanet.Planet')),
            ],
            options={
                'db_table': 'molecule',
            },
        ),
    ]
