123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- # Generated by Django 3.1.3 on 2020-11-15 21:19
- from django.db import migrations, models
- import django.db.models.deletion
- class Migration(migrations.Migration):
- initial = True
- dependencies = [
- ("projects", "0007_auto_20201026_2354"),
- ("organizations_ext", "0001_squashed_0009_organization_scrub_ip_addresses"),
- ]
- operations = [
- migrations.CreateModel(
- name="Environment",
- fields=[
- (
- "id",
- models.AutoField(
- auto_created=True,
- primary_key=True,
- serialize=False,
- verbose_name="ID",
- ),
- ),
- ("name", models.CharField(max_length=256)),
- ("created", models.DateTimeField(auto_now_add=True, db_index=True)),
- (
- "organization",
- models.ForeignKey(
- on_delete=django.db.models.deletion.CASCADE,
- to="organizations_ext.organization",
- ),
- ),
- ],
- ),
- migrations.CreateModel(
- name="EnvironmentProject",
- fields=[
- (
- "id",
- models.AutoField(
- auto_created=True,
- primary_key=True,
- serialize=False,
- verbose_name="ID",
- ),
- ),
- ("is_hidden", models.BooleanField()),
- ("created", models.DateTimeField(auto_now_add=True, db_index=True)),
- (
- "environment",
- models.ForeignKey(
- on_delete=django.db.models.deletion.CASCADE,
- to="environments.environment",
- ),
- ),
- (
- "project",
- models.ForeignKey(
- on_delete=django.db.models.deletion.CASCADE,
- to="projects.project",
- ),
- ),
- ],
- options={
- "unique_together": {("project", "environment")},
- },
- ),
- migrations.AddField(
- model_name="environment",
- name="projects",
- field=models.ManyToManyField(
- through="environments.EnvironmentProject", to="projects.Project"
- ),
- ),
- migrations.AlterUniqueTogether(
- name="environment",
- unique_together={("organization", "name")},
- ),
- ]
|