cmsmanage/tasks/migrations/0001_initial.py
Adam Goldsmith cf6bf97e45 Only use implicit AutoFields for primary keys
django really doesn't handle updating PKs well, so don't bother.

Reset migrations, because I don't really have enough data for it to be
worth the effort to migrate
2021-05-19 14:06:45 -04:00

77 lines
3.3 KiB
Python

# Generated by Django 3.2.3 on 2021-05-19 18:05
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
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')},
},
),
]