StudE-Backend/stude/study_groups/migrations/0001_initial.py

30 lines
1.1 KiB
Python
Raw Normal View History

# Generated by Django 4.2.5 on 2023-10-01 16:37
2023-06-27 21:12:03 +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 = [
('subjects', '0001_initial'),
('landmarks', '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')),
('name', models.CharField(max_length=48, unique=True)),
('location', django.contrib.gis.db.models.fields.PointField(blank=True, null=True, srid=4326)),
2023-06-27 21:12:03 +08:00
('timestamp', models.DateField(auto_now_add=True)),
('landmark', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='landmarks.landmark')),
2023-06-27 21:12:03 +08:00
('subject', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='subjects.subject')),
],
),
]