<gh_stars>10-100
# Generated by Django 3.0.5 on 2020-05-27 17:14

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('collection', '0002_job_job_code'),
    ]

    operations = [
        migrations.AlterField(
            model_name='job',
            name='date_end',
            field=models.DateField(help_text='Latest date of this job'),
        ),
        migrations.AlterField(
            model_name='job',
            name='date_start',
            field=models.DateField(help_text='Earliest date of this job'),
        ),
        migrations.CreateModel(
            name='JobTag',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('label', models.CharField(help_text='Unique short readable label', max_length=400, unique=True)),
                ('description', models.TextField(blank=True, help_text='Descriptive notes')),
                ('user_last_modified', models.ForeignKey(editable=False, help_text='Last modified by user', null=True, on_delete=django.db.models.deletion.PROTECT, related_name='jobtags_modified', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='JobsTags',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('job', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='jobs_tags', to='collection.Job')),
                ('job_tag', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='jobs_tags', to='collection.JobTag')),
            ],
            options={
                'unique_together': {('job', 'job_tag')},
            },
        ),
        migrations.AddField(
            model_name='job',
            name='tags',
            field=models.ManyToManyField(help_text='Tags for this job', related_name='jobs', through='collection.JobsTags', to='collection.JobTag'),
        ),
    ]

# Generated by Django 3.0.5 on 2020-05-27 17:14

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('collection', '0002_job_job_code'),
    ]

    operations = [
        migrations.AlterField(
            model_name='job',
            name='date_end',
            field=models.DateField(help_text='Latest date of this job'),
        ),
        migrations.AlterField(
            model_name='job',
            name='date_start',
            field=models.DateField(help_text='Earliest date of this job'),
        ),
        migrations.CreateModel(
            name='JobTag',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('label', models.CharField(help_text='Unique short readable label', max_length=400, unique=True)),
                ('description', models.TextField(blank=True, help_text='Descriptive notes')),
                ('user_last_modified', models.ForeignKey(editable=False, help_text='Last modified by user', null=True, on_delete=django.db.models.deletion.PROTECT, related_name='jobtags_modified', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='JobsTags',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('job', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='jobs_tags', to='collection.Job')),
                ('job_tag', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='jobs_tags', to='collection.JobTag')),
            ],
            options={
                'unique_together': {('job', 'job_tag')},
            },
        ),
        migrations.AddField(
            model_name='job',
            name='tags',
            field=models.ManyToManyField(help_text='Tags for this job', related_name='jobs', through='collection.JobsTags', to='collection.JobTag'),
        ),
    ]
# Generated by Django 3.0.5 on 2020-05-27 17:14