<filename>pfxview/migrations/0001_initial.py
# -*- coding: utf-8 -*-
# Generated by Django 1.11.7 on 2017-11-29 01:56
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Atbat',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('inning', models.IntegerField(blank=True, null=True)),
                ('top_bottom', models.IntegerField(blank=True, null=True)),
                ('num', models.IntegerField(blank=True, null=True)),
                ('b', models.IntegerField(blank=True, null=True)),
                ('s', models.IntegerField(blank=True, null=True)),
                ('o', models.IntegerField(blank=True, null=True)),
                ('start_tfs', models.IntegerField(blank=True, null=True)),
                ('start_tfs_zulu', models.DateTimeField(blank=True, null=True)),
                ('batter', models.IntegerField(blank=True, null=True)),
                ('stand', models.CharField(blank=True, max_length=3, null=True)),
                ('b_height', models.CharField(blank=True, max_length=10, null=True)),
                ('pitcher', models.IntegerField(blank=True, null=True)),
                ('p_throws', models.CharField(blank=True, max_length=3, null=True)),
                ('des', models.CharField(blank=True, max_length=1028, null=True)),
                ('des_es', models.CharField(blank=True, max_length=1028, null=True)),
                ('event_num', models.IntegerField(blank=True, null=True)),
                ('event', models.CharField(blank=True, max_length=128, null=True)),
                ('event_es', models.CharField(blank=True, max_length=128, null=True)),
                ('event2', models.CharField(blank=True, max_length=128, null=True)),
                ('event2_es', models.CharField(blank=True, max_length=128, null=True)),
                ('event3', models.CharField(blank=True, max_length=128, null=True)),
                ('event3_es', models.CharField(blank=True, max_length=128, null=True)),
                ('play_guid', models.CharField(blank=True, max_length=128, null=True)),
                ('home_team_runs', models.IntegerField(blank=True, null=True)),
                ('away_team_runs', models.IntegerField(blank=True, null=True)),
                ('score', models.CharField(blank=True, max_length=3, null=True)),
                ('datetime_created', models.DateTimeField(auto_now_add=True)),
                ('datetime_updated', models.DateTimeField(auto_now=True)),
            ],
        ),
        migrations.CreateModel(
            name='Defense',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
            ],
        ),
        migrations.CreateModel(
            name='Game',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('gid', models.CharField(max_length=30)),
                ('date', models.DateField()),
                ('datetime_created', models.DateTimeField(auto_now_add=True)),
                ('datetime_updated', models.DateTimeField(auto_now=True)),
            ],
        ),
        migrations.CreateModel(
            name='Pitch',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('atbat_num', models.IntegerField()),
                ('game_id', models.IntegerField()),
                ('des', models.CharField(blank=True, max_length=1028, null=True)),
                ('des_es', models.CharField(blank=True, max_length=1028, null=True)),
                ('external_id', models.IntegerField(blank=True, null=True)),
                ('result_type', models.CharField(blank=True, max_length=3, null=True)),
                ('pitch_type', models.CharField(blank=True, max_length=3, null=True)),
                ('tfs', models.IntegerField(blank=True, null=True)),
                ('tfs_zulu', models.DateTimeField(blank=True, null=True)),
                ('x', models.DecimalField(blank=True, decimal_places=4, max_digits=7)),
                ('y', models.DecimalField(blank=True, decimal_places=4, max_digits=7)),
                ('event_num', models.IntegerField(blank=True, null=True)),
                ('sv_id', models.CharField(blank=True, max_length=40, null=True)),
                ('play_guid', models.CharField(blank=True, max_length=40, null=True)),
                ('start_speed', models.DecimalField(blank=True, decimal_places=4, max_digits=7, null=True)),
                ('end_speed', models.DecimalField(blank=True, decimal_places=4, max_digits=7, null=True)),
                ('sz_top', models.DecimalField(blank=True, decimal_places=4, max_digits=7, null=True)),
                ('sz_bot', models.DecimalField(blank=True, decimal_places=4, max_digits=7, null=True)),
                ('pfx_x', models.DecimalField(blank=True, decimal_places=4, max_digits=7, null=True)),
                ('pfx_z', models.DecimalField(blank=True, decimal_places=4, max_digits=7, null=True)),
                ('px', models.DecimalField(blank=True, decimal_places=4, max_digits=7, null=True)),
                ('pz', models.DecimalField(blank=True, decimal_places=4, max_digits=7, null=True)),
                ('x0', models.DecimalField(blank=True, decimal_places=4, max_digits=7, null=True)),
                ('y0', models.DecimalField(blank=True, decimal_places=4, max_digits=7, null=True)),
                ('z0', models.DecimalField(blank=True, decimal_places=4, max_digits=7, null=True)),
                ('vx0', models.DecimalField(blank=True, decimal_places=4, max_digits=7, null=True)),
                ('vy0', models.DecimalField(blank=True, decimal_places=4, max_digits=7, null=True)),
                ('vz0', models.DecimalField(blank=True, decimal_places=4, max_digits=7, null=True)),
                ('ax', models.DecimalField(blank=True, decimal_places=4, max_digits=7, null=True)),
                ('ay', models.DecimalField(blank=True, decimal_places=4, max_digits=7, null=True)),
                ('az', models.DecimalField(blank=True, decimal_places=4, max_digits=7, null=True)),
                ('break_y', models.DecimalField(blank=True, decimal_places=4, max_digits=7, null=True)),
                ('break_angle', models.DecimalField(blank=True, decimal_places=4, max_digits=7, null=True)),
                ('break_length', models.DecimalField(blank=True, decimal_places=4, max_digits=7, null=True)),
                ('type_confidence', models.DecimalField(blank=True, decimal_places=4, max_digits=7, null=True)),
                ('zone', models.IntegerField(blank=True, null=True)),
                ('nasty', models.IntegerField(blank=True, null=True)),
                ('spin_dir', models.DecimalField(blank=True, decimal_places=4, max_digits=10, null=True)),
                ('spin_rate', models.DecimalField(blank=True, decimal_places=4, max_digits=10, null=True)),
                ('cc', models.CharField(blank=True, max_length=1000, null=True)),
                ('mt', models.CharField(blank=True, max_length=1000, null=True)),
                ('on_1b', models.IntegerField(blank=True, null=True)),
                ('on_2b', models.IntegerField(blank=True, null=True)),
                ('on_3b', models.IntegerField(blank=True, null=True)),
                ('balls', models.IntegerField()),
                ('strikes', models.IntegerField()),
                ('datetime_created', models.DateTimeField(auto_now_add=True)),
                ('datetime_updated', models.DateTimeField(auto_now=True)),
                ('atbat', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='pfxview.Atbat')),
            ],
        ),
        migrations.CreateModel(
            name='Player',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('first', models.CharField(max_length=40)),
                ('last', models.CharField(max_length=40)),
                ('boxname', models.CharField(blank=True, max_length=40, null=True)),
                ('rl', models.CharField(blank=True, max_length=10, null=True)),
                ('bats', models.CharField(blank=True, max_length=10, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Team',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=128)),
                ('short', models.CharField(max_length=20)),
            ],
        ),
        migrations.AddField(
            model_name='game',
            name='away_team',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='away_team_game', to='pfxview.Team'),
        ),
        migrations.AddField(
            model_name='game',
            name='home_team',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='home_team_game', to='pfxview.Team'),
        ),
        migrations.AddField(
            model_name='defense',
            name='catcher',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='catcher', to='pfxview.Player'),
        ),
        migrations.AddField(
            model_name='defense',
            name='center_field',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='center_field', to='pfxview.Player'),
        ),
        migrations.AddField(
            model_name='defense',
            name='first_base',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='first_base', to='pfxview.Player'),
        ),
        migrations.AddField(
            model_name='defense',
            name='left_field',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='left_field', to='pfxview.Player'),
        ),
        migrations.AddField(
            model_name='defense',
            name='right_field',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='right_field', to='pfxview.Player'),
        ),
        migrations.AddField(
            model_name='defense',
            name='second_base',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='second_base', to='pfxview.Player'),
        ),
        migrations.AddField(
            model_name='defense',
            name='shortstop',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='shortstop', to='pfxview.Player'),
        ),
        migrations.AddField(
            model_name='defense',
            name='third_base',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='third_base', to='pfxview.Player'),
        ),
        migrations.AddField(
            model_name='atbat',
            name='defense',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='pfxview.Defense'),
        ),
        migrations.AddField(
            model_name='atbat',
            name='game',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='pfxview.Game'),
        ),
        migrations.AlterUniqueTogether(
            name='atbat',
            unique_together=set([('game', 'num')]),
        ),
    ]
