Skip to content
Snippets Groups Projects
Verified Commit e627460c authored by Ernesto Rico Schmidt's avatar Ernesto Rico Schmidt
Browse files

feat: replace default_playlist_id with default_playlist

parent d61036fc
No related branches found
No related tags found
1 merge request!59Add playlists
# Generated by Django 4.2.16 on 2024-10-29 21:28
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("program", "0120_playlistentry"),
]
operations = [
migrations.RemoveField(
model_name="schedule",
name="default_playlist_id",
),
migrations.RemoveField(
model_name="show",
name="default_playlist_id",
),
migrations.AddField(
model_name="schedule",
name="default_playlist",
field=models.ForeignKey(
help_text="Playlist in case a timeslot’s playlist_id of this schedule is empty.",
null=True,
on_delete=django.db.models.deletion.SET_NULL,
related_name="+",
to="program.playlist",
),
),
migrations.AddField(
model_name="show",
name="default_playlist",
field=models.ForeignKey(
help_text="Playlist in case a timeslot’s playlist_id of this show is empty.",
null=True,
on_delete=django.db.models.deletion.SET_NULL,
related_name="+",
to="program.playlist",
),
),
]
......@@ -238,7 +238,13 @@ class Show(models.Model):
cba_series_id = models.IntegerField(blank=True, null=True)
created_at = models.DateTimeField(auto_now_add=True)
created_by = models.CharField(max_length=150)
default_playlist_id = models.IntegerField(blank=True, null=True)
default_playlist = models.ForeignKey(
"Playlist",
help_text="Playlist in case a timeslot’s playlist_id of this show is empty.",
null=True,
on_delete=models.SET_NULL,
related_name="+",
)
description = models.TextField(blank=True, help_text="Description of this show.")
email = models.EmailField(blank=True, null=True, help_text="Email address of this show.")
funding_category = models.ForeignKey(
......@@ -404,10 +410,12 @@ class Schedule(models.Model):
],
null=True,
)
default_playlist_id = models.IntegerField(
blank=True,
default_playlist = models.ForeignKey(
"Playlist",
help_text="Playlist in case a timeslot’s playlist_id of this schedule is empty.",
null=True,
help_text="A tank ID in case the timeslot's playlist_id is empty.",
on_delete=models.SET_NULL,
related_name="+",
)
end_time = models.TimeField(null=True, help_text="End time of schedule.")
first_date = models.DateField(help_text="Start date of schedule.")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment