# Generated by Django 3.1.4 on 2020-12-18 21:28 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ( "projects", "0001_squashed_0009_alter_project_id_alter_projectcounter_id_and_more", ), ( "organizations_ext", "0001_squashed_0003_alter_organization_id_alter_organization_users_and_more", ), migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.CreateModel( name="Release", fields=[ ( "id", models.AutoField( auto_created=True, primary_key=True, serialize=False, verbose_name="ID", ), ), ("version", models.CharField(max_length=255)), ( "ref", models.CharField( blank=True, help_text="May be branch or tag name", max_length=255, null=True, ), ), ("url", models.URLField(blank=True, null=True)), ("created", models.DateTimeField(auto_now_add=True, db_index=True)), ("released", models.DateTimeField(blank=True, null=True)), ("data", models.JSONField()), ("commit_count", models.PositiveSmallIntegerField(default=0)), ("deploy_count", models.PositiveSmallIntegerField(default=0)), ( "organization", models.ForeignKey( on_delete=django.db.models.deletion.CASCADE, to="organizations_ext.organization", ), ), ( "owner", models.ForeignKey( blank=True, help_text="Release manager - the person initiating the release", null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL, ), ), ( "projects", models.ManyToManyField( related_name="releases", to="projects.Project", ), ), ], options={ "unique_together": {("organization", "version")}, }, ), migrations.CreateModel( name="ReleaseProject", fields=[ ( "id", models.AutoField( auto_created=True, primary_key=True, serialize=False, verbose_name="ID", ), ), ( "project", models.ForeignKey( on_delete=django.db.models.deletion.CASCADE, to="projects.project", ), ), ( "release", models.ForeignKey( on_delete=django.db.models.deletion.CASCADE, to="releases.release", ), ), ], options={ "unique_together": {("project", "release")}, }, ), ]