mirror of
https://github.com/seanmorley15/AdventureLog.git
synced 2025-07-30 18:29:37 +02:00
Migrate to visits
This commit is contained in:
parent
6dec37d3b9
commit
0911826501
14 changed files with 110 additions and 194 deletions
27
backend/server/adventures/migrations/0002_visit.py
Normal file
27
backend/server/adventures/migrations/0002_visit.py
Normal file
|
@ -0,0 +1,27 @@
|
|||
# Generated by Django 5.0.8 on 2024-09-22 15:32
|
||||
|
||||
import django.db.models.deletion
|
||||
import uuid
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('adventures', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='Visit',
|
||||
fields=[
|
||||
('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False, unique=True)),
|
||||
('start_date', models.DateField(blank=True, null=True)),
|
||||
('end_date', models.DateField(blank=True, null=True)),
|
||||
('notes', models.TextField(blank=True, null=True)),
|
||||
('created_at', models.DateTimeField(auto_now_add=True)),
|
||||
('updated_at', models.DateTimeField(auto_now=True)),
|
||||
('adventure', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='visits', to='adventures.adventure')),
|
||||
],
|
||||
),
|
||||
]
|
Loading…
Add table
Add a link
Reference in a new issue