123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108 |
- # 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_0009_organization_scrub_ip_addresses"),
- 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")},
- },
- ),
- ]
|