# Generated by Django 2.2.9 on 2019-12-31 20:27

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


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Content',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('sha', models.UUIDField()),
                ('name', models.CharField(max_length=128)),
                ('type', models.CharField(blank=True, default='', max_length=32)),
                ('path', models.CharField(blank=True, default='', max_length=64)),
                ('size', models.IntegerField(blank=True, null=True)),
                ('url', models.URLField(blank=True, default='')),
                ('download_url', models.URLField(blank=True, default='')),
            ],
        ),
        migrations.CreateModel(
            name='Repository',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('github_id', models.PositiveIntegerField(null=True, unique=True)),
                ('name', models.CharField(max_length=100)),
                ('full_name', models.CharField(max_length=100, null=True, unique=True)),
                ('description', models.CharField(blank=True, default='', max_length=255)),
                ('language', models.CharField(blank=True, default='', max_length=64)),
                ('stargazers_count', models.PositiveIntegerField(blank=True, null=True)),
                ('archived', models.BooleanField(default=False)),
                ('disabled', models.BooleanField(default=False)),
                ('clone_url', models.URLField(blank=True, default='')),
                ('git_url', models.URLField(blank=True, default='')),
                ('created_at', models.DateTimeField()),
                ('updated_at', models.DateTimeField()),
                ('owner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Commit',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('sha', models.UUIDField()),
                ('message', models.TextField(blank=True, default='')),
                ('authored_date', models.DateTimeField(blank=True, null=True)),
                ('author', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL)),
                ('repository', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.Repository')),
            ],
        ),
    ]
