45 lines
1.6 KiB
Python
45 lines
1.6 KiB
Python
# Generated by Django 3.1.3 on 2020-12-02 20:39
|
|
|
|
from django.conf import settings
|
|
from django.db import migrations, models
|
|
import django.db.models.deletion
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
initial = True
|
|
|
|
dependencies = [
|
|
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name='Tool',
|
|
fields=[
|
|
('name', models.CharField(max_length=200)),
|
|
('asset_tag', models.CharField(max_length=10, primary_key=True, serialize=False)),
|
|
],
|
|
),
|
|
migrations.CreateModel(
|
|
name='Task',
|
|
fields=[
|
|
('name', models.CharField(max_length=200)),
|
|
('slug', models.SlugField(primary_key=True, serialize=False)),
|
|
('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')),
|
|
],
|
|
),
|
|
migrations.CreateModel(
|
|
name='Event',
|
|
fields=[
|
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('date', models.DateField()),
|
|
('notes', models.TextField(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)),
|
|
],
|
|
),
|
|
]
|