cmsmanage/tasks/migrations/0001_initial.py

153 lines
4.9 KiB
Python
Raw Permalink Normal View History

# Generated by Django 3.2.3 on 2021-05-19 18:05
import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models
import markdownx.models
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
("auth", "0012_alter_user_first_name_max_length"),
]
operations = [
migrations.CreateModel(
name="Tool",
fields=[
(
"id",
models.BigAutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
("name", models.CharField(max_length=200)),
("asset_tag", models.CharField(blank=True, max_length=10, unique=True)),
],
),
migrations.CreateModel(
name="Task",
fields=[
(
"id",
models.BigAutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
("name", models.CharField(max_length=200)),
("slug", models.SlugField()),
("description", markdownx.models.MarkdownxField(blank=True)),
("recurrence_interval", models.CharField(max_length=200)),
("recurrence_base", models.DateField(blank=True, null=True)),
(
"tool",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE, to="tasks.tool"
),
),
],
options={
"unique_together": {("tool", "slug")},
},
),
migrations.CreateModel(
name="Event",
fields=[
(
"id",
models.BigAutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
("date", models.DateField()),
("notes", markdownx.models.MarkdownxField(blank=True)),
(
"task",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE, to="tasks.task"
),
),
(
"user",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
to=settings.AUTH_USER_MODEL,
),
),
],
),
migrations.CreateModel(
name="GroupToolSubscription",
fields=[
(
"id",
models.BigAutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
("days_before", models.PositiveIntegerField()),
(
"group",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE, to="auth.group"
),
),
(
"tool",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE, to="tasks.tool"
),
),
],
options={
"unique_together": {("group", "tool")},
},
),
migrations.CreateModel(
name="GroupTaskSubscription",
fields=[
(
"id",
models.BigAutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
("days_before", models.PositiveIntegerField()),
(
"group",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE, to="auth.group"
),
),
(
"task",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE, to="tasks.task"
),
),
],
options={
"unique_together": {("group", "task")},
},
),
]