Commit 31671524 authored by Sondre Westby Liestøl's avatar Sondre Westby Liestøl
Browse files

Made migration to workoutmodel #2

parent dc141052
Pipeline #160768 passed with stage
in 23 seconds
# Generated by Django 3.1 on 2022-03-10 15:25
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('workouts', '0007_auto_20220310_1518'),
]
operations = [
migrations.AddField(
model_name='workout',
name='members',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='groupworkouts', to='workouts.workout'),
),
]
......@@ -47,6 +47,9 @@ class Workout(models.Model):
get_user_model(), on_delete=models.CASCADE, related_name="workouts"
)
difficulty = models.IntegerField(default=1)
members = models.ForeignKey(
"self", on_delete=models.CASCADE, related_name="groupworkouts", blank=True, null=True
)
# Visibility levels
PUBLIC = "PU" # Visible to all authenticated users
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment