71 lines
4.3 KiB
Python
71 lines
4.3 KiB
Python
# Generated by Django 3.2.13 on 2023-08-02 19:38
|
|
|
|
import django.contrib.postgres.fields
|
|
from django.db import migrations, models
|
|
import django.db.models.deletion
|
|
import simple_history.models
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
('APIs', '0010_auto_20230725_1235'),
|
|
]
|
|
|
|
operations = [
|
|
migrations.AlterField(
|
|
model_name='historicalinternship',
|
|
name='facilities_provided',
|
|
field=django.contrib.postgres.fields.ArrayField(base_field=models.CharField(choices=[['Accommodation', 'Accommodation'], ['Food', 'Food'], ['Transport', 'Transport'], ['Medical', 'Medical']], max_length=20, null=True), default=list, size=4),
|
|
),
|
|
migrations.AlterField(
|
|
model_name='internship',
|
|
name='facilities_provided',
|
|
field=django.contrib.postgres.fields.ArrayField(base_field=models.CharField(choices=[['Accommodation', 'Accommodation'], ['Food', 'Food'], ['Transport', 'Transport'], ['Medical', 'Medical']], max_length=20, null=True), default=list, size=4),
|
|
),
|
|
migrations.CreateModel(
|
|
name='HistoricalInternshipApplication',
|
|
fields=[
|
|
('id', models.CharField(db_index=True, max_length=15)),
|
|
('resume', models.CharField(default=None, max_length=100, null=True)),
|
|
('additional_info', models.JSONField(blank=True, default=None, null=True)),
|
|
('selected', models.BooleanField(blank=True, default=None, null=True)),
|
|
('applied_at', models.DateTimeField(default=None, null=True)),
|
|
('updated_at', models.DateTimeField(default=None, null=True)),
|
|
('history_id', models.AutoField(primary_key=True, serialize=False)),
|
|
('history_date', models.DateTimeField(db_index=True)),
|
|
('history_change_reason', models.CharField(max_length=100, null=True)),
|
|
('history_type', models.CharField(choices=[('+', 'Created'), ('~', 'Changed'), ('-', 'Deleted')], max_length=1)),
|
|
('changed_by', models.ForeignKey(blank=True, db_constraint=False, default=None, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='APIs.user')),
|
|
('history_user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='APIs.user')),
|
|
('internship', models.ForeignKey(blank=True, db_constraint=False, default=None, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='APIs.internship')),
|
|
('student', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='APIs.student')),
|
|
],
|
|
options={
|
|
'verbose_name': 'historical internship application',
|
|
'verbose_name_plural': 'historical Internship Applications',
|
|
'ordering': ('-history_date', '-history_id'),
|
|
'get_latest_by': ('history_date', 'history_id'),
|
|
},
|
|
bases=(simple_history.models.HistoricalChanges, models.Model),
|
|
),
|
|
migrations.CreateModel(
|
|
name='InternshipApplication',
|
|
fields=[
|
|
('id', models.CharField(max_length=15, primary_key=True, serialize=False)),
|
|
('resume', models.CharField(default=None, max_length=100, null=True)),
|
|
('additional_info', models.JSONField(blank=True, default=None, null=True)),
|
|
('selected', models.BooleanField(blank=True, default=None, null=True)),
|
|
('applied_at', models.DateTimeField(default=None, null=True)),
|
|
('updated_at', models.DateTimeField(default=None, null=True)),
|
|
('changed_by', models.ForeignKey(default=None, null=True, on_delete=django.db.models.deletion.RESTRICT, to='APIs.user')),
|
|
('internship', models.ForeignKey(default=None, null=True, on_delete=django.db.models.deletion.RESTRICT, to='APIs.internship')),
|
|
('student', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='APIs.student')),
|
|
],
|
|
options={
|
|
'verbose_name_plural': 'Internship Applications',
|
|
'unique_together': {('internship_id', 'student_id')},
|
|
},
|
|
),
|
|
]
|