ipv6-dot-work/jobs/migrations/0001_initial.py

62 lines
2.6 KiB
Python
Raw Normal View History

# Generated by Django 2.1.2 on 2018-10-17 07:35
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import jobs.date_utils
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.CreateModel(
name='Application',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('created', models.DateTimeField(auto_now_add=True)),
('applicant', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='applications', to=settings.AUTH_USER_MODEL)),
],
),
migrations.CreateModel(
name='Job',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('title', models.CharField(max_length=2055)),
('description', models.TextField()),
('created', models.DateTimeField(auto_now_add=True)),
('updated', models.DateTimeField(auto_now=True)),
('expires', models.DateTimeField(default=jobs.date_utils.after_30_days)),
('closed', models.BooleanField(default=False)),
('close_reason', models.CharField(blank=True, choices=[('filled', 'Job filled'), ('cancelled', 'Job Cancelled'), ('not-found', 'Suitable candidate not found')], max_length=2055)),
('posted_by', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='jobs', to=settings.AUTH_USER_MODEL)),
],
),
migrations.CreateModel(
name='Tag',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(db_index=True, max_length=255, unique=True)),
],
),
migrations.AddField(
model_name='job',
name='tags',
field=models.ManyToManyField(related_name='jobs', to='jobs.Tag'),
),
migrations.AddField(
model_name='application',
name='job',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='applications', to='jobs.Job'),
),
migrations.AlterUniqueTogether(
name='application',
unique_together={('applicant', 'job')},
),
]