1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- # 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",
- "0001_squashed_0009_alter_project_id_alter_projectcounter_id_and_more",
- ),
- ("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")},
- ),
- ]
|