<gh_stars>0
# Generated by Django 3.2.12 on 2022-03-23 12:41

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
import model_utils.fields


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='GolfClub',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, editable=False, verbose_name='created')),
                ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, editable=False, verbose_name='modified')),
                ('name', models.CharField(max_length=30, verbose_name='Name')),
                ('order', models.PositiveSmallIntegerField(verbose_name='Order')),
                ('player', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='golf_clubs', to=settings.AUTH_USER_MODEL, verbose_name='Player')),
            ],
            options={
                'ordering': ('order',),
                'unique_together': {('player', 'name')},
            },
        ),
        migrations.CreateModel(
            name='GolfCourse',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, editable=False, verbose_name='created')),
                ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, editable=False, verbose_name='modified')),
                ('name', models.CharField(max_length=80, verbose_name='Name')),
                ('short_name', models.CharField(max_length=30, verbose_name='Short name')),
                ('country', models.CharField(help_text='ISO 3166 country code', max_length=3, verbose_name='Country')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='HitClassification',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, editable=False, verbose_name='created')),
                ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, editable=False, verbose_name='modified')),
                ('order', models.PositiveSmallIntegerField(verbose_name='Order')),
                ('name', models.CharField(max_length=30, verbose_name='Name')),
                ('hit_type', models.PositiveSmallIntegerField(default=1, help_text='Give 1 for a bad hit, 2 for a good hit', verbose_name='Hit type')),
                ('player', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='hit_classifications', to=settings.AUTH_USER_MODEL, verbose_name='Player')),
            ],
            options={
                'ordering': ('order',),
                'unique_together': {('player', 'name')},
            },
        ),
        migrations.CreateModel(
            name='RangeHit',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, editable=False, verbose_name='created')),
                ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, editable=False, verbose_name='modified')),
                ('distance', models.PositiveSmallIntegerField(verbose_name='Distance')),
                ('direction', models.CharField(choices=[('L', 'Left'), ('S', 'Straight'), ('R', 'Right')], max_length=1, verbose_name='Direction')),
                ('club', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='range_hits', to='golf.golfclub', verbose_name='Club')),
                ('course', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='range_hits', to='golf.golfcourse', verbose_name='Course')),
                ('hit_classification', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='range_hits', to='golf.hitclassification', verbose_name='Hit class')),
                ('player', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='range_hits', to=settings.AUTH_USER_MODEL, verbose_name='Player')),
            ],
            options={
                'ordering': ('created',),
            },
        ),
    ]

# Generated by Django 3.2.12 on 2022-03-23 12:41

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
import model_utils.fields


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='GolfClub',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, editable=False, verbose_name='created')),
                ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, editable=False, verbose_name='modified')),
                ('name', models.CharField(max_length=30, verbose_name='Name')),
                ('order', models.PositiveSmallIntegerField(verbose_name='Order')),
                ('player', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='golf_clubs', to=settings.AUTH_USER_MODEL, verbose_name='Player')),
            ],
            options={
                'ordering': ('order',),
                'unique_together': {('player', 'name')},
            },
        ),
        migrations.CreateModel(
            name='GolfCourse',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, editable=False, verbose_name='created')),
                ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, editable=False, verbose_name='modified')),
                ('name', models.CharField(max_length=80, verbose_name='Name')),
                ('short_name', models.CharField(max_length=30, verbose_name='Short name')),
                ('country', models.CharField(help_text='ISO 3166 country code', max_length=3, verbose_name='Country')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='HitClassification',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, editable=False, verbose_name='created')),
                ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, editable=False, verbose_name='modified')),
                ('order', models.PositiveSmallIntegerField(verbose_name='Order')),
                ('name', models.CharField(max_length=30, verbose_name='Name')),
                ('hit_type', models.PositiveSmallIntegerField(default=1, help_text='Give 1 for a bad hit, 2 for a good hit', verbose_name='Hit type')),
                ('player', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='hit_classifications', to=settings.AUTH_USER_MODEL, verbose_name='Player')),
            ],
            options={
                'ordering': ('order',),
                'unique_together': {('player', 'name')},
            },
        ),
        migrations.CreateModel(
            name='RangeHit',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, editable=False, verbose_name='created')),
                ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, editable=False, verbose_name='modified')),
                ('distance', models.PositiveSmallIntegerField(verbose_name='Distance')),
                ('direction', models.CharField(choices=[('L', 'Left'), ('S', 'Straight'), ('R', 'Right')], max_length=1, verbose_name='Direction')),
                ('club', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='range_hits', to='golf.golfclub', verbose_name='Club')),
                ('course', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='range_hits', to='golf.golfcourse', verbose_name='Course')),
                ('hit_classification', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='range_hits', to='golf.hitclassification', verbose_name='Hit class')),
                ('player', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='range_hits', to=settings.AUTH_USER_MODEL, verbose_name='Player')),
            ],
            options={
                'ordering': ('created',),
            },
        ),
    ]
# Generated by Django 3.2.12 on 2022-03-23 12:41