2023-08-06 14:19:55 +08:00
|
|
|
# Generated by Django 4.2.3 on 2023-08-06 05:55
|
2023-06-27 21:12:03 +08:00
|
|
|
|
2023-07-09 19:00:47 +08:00
|
|
|
import django.contrib.gis.db.models.fields
|
2023-06-27 21:12:03 +08:00
|
|
|
from django.db import migrations, models
|
|
|
|
import django.db.models.deletion
|
|
|
|
|
|
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
|
|
|
|
initial = True
|
|
|
|
|
|
|
|
dependencies = [
|
2023-07-26 23:32:03 +08:00
|
|
|
('student_status', '0001_initial'),
|
2023-08-06 14:19:55 +08:00
|
|
|
('subjects', '0001_initial'),
|
2023-06-27 21:12:03 +08:00
|
|
|
]
|
|
|
|
|
|
|
|
operations = [
|
|
|
|
migrations.CreateModel(
|
|
|
|
name='StudyGroup',
|
|
|
|
fields=[
|
|
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
2023-06-28 00:49:11 +08:00
|
|
|
('name', models.CharField(max_length=48)),
|
2023-07-09 19:00:47 +08:00
|
|
|
('location', django.contrib.gis.db.models.fields.PointField(blank=True, null=True, srid=4326)),
|
2023-06-27 21:12:03 +08:00
|
|
|
('active', models.BooleanField(default=False)),
|
|
|
|
('timestamp', models.DateField(auto_now_add=True)),
|
|
|
|
('subject', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='subjects.subject')),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
migrations.CreateModel(
|
|
|
|
name='StudyGroupMembership',
|
|
|
|
fields=[
|
|
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
|
|
('study_group', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='study_groups.studygroup')),
|
|
|
|
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='student_status.studentstatus')),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
migrations.AddField(
|
|
|
|
model_name='studygroup',
|
|
|
|
name='users',
|
|
|
|
field=models.ManyToManyField(through='study_groups.StudyGroupMembership', to='student_status.studentstatus'),
|
|
|
|
),
|
|
|
|
]
|