You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
115 lines
4.9 KiB
115 lines
4.9 KiB
# Generated by Django 3.2.4 on 2025-12-01 13:21
|
|
|
|
from django.db import migrations, models
|
|
import django.db.models.deletion
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
('podcast', '0002_podcast_collections_alter_podcast_categories_and_more'),
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name='PodcastPlaylistInCollection',
|
|
fields=[
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('order', models.PositiveIntegerField(default=0, verbose_name='order')),
|
|
('created_at', models.DateTimeField(auto_now_add=True, verbose_name='created at')),
|
|
('updated_at', models.DateTimeField(auto_now=True, verbose_name='updated at')),
|
|
],
|
|
options={
|
|
'verbose_name': 'Podcast Playlist in Collection',
|
|
'verbose_name_plural': 'Podcast Playlists in Collections',
|
|
'ordering': ['order'],
|
|
},
|
|
),
|
|
migrations.AlterModelOptions(
|
|
name='middlepodcastcollection',
|
|
options={'verbose_name': 'Regular Collection (Middle Section)', 'verbose_name_plural': 'Regular Collections (Middle Section)'},
|
|
),
|
|
migrations.AlterModelOptions(
|
|
name='pinnedpodcastcollection',
|
|
options={'verbose_name': 'Pinned Collection (Top Section)', 'verbose_name_plural': 'Pinned Collections (Top Section)'},
|
|
),
|
|
migrations.AlterModelOptions(
|
|
name='podcastplaylist',
|
|
options={'ordering': ['order', '-created_at'], 'verbose_name': 'Podcast Playlist', 'verbose_name_plural': 'Podcast Playlists'},
|
|
),
|
|
migrations.RemoveField(
|
|
model_name='podcast',
|
|
name='collections',
|
|
),
|
|
migrations.RemoveField(
|
|
model_name='podcastcollection',
|
|
name='podcasts',
|
|
),
|
|
migrations.AddField(
|
|
model_name='podcastplaylist',
|
|
name='categories',
|
|
field=models.ManyToManyField(blank=True, related_name='playlists', to='podcast.PodcastCategory', verbose_name='categories'),
|
|
),
|
|
migrations.AddField(
|
|
model_name='podcastplaylist',
|
|
name='description',
|
|
field=models.TextField(blank=True, null=True, verbose_name='description'),
|
|
),
|
|
migrations.AddField(
|
|
model_name='podcastplaylist',
|
|
name='order',
|
|
field=models.PositiveIntegerField(default=0, verbose_name='order'),
|
|
),
|
|
migrations.AddField(
|
|
model_name='podcastplaylist',
|
|
name='slogan',
|
|
field=models.CharField(blank=True, max_length=512, null=True, verbose_name='slogan'),
|
|
),
|
|
migrations.AddField(
|
|
model_name='podcastplaylist',
|
|
name='slug',
|
|
field=models.SlugField(allow_unicode=True, blank=True, null=True, unique=True, verbose_name='slug'),
|
|
),
|
|
migrations.AddField(
|
|
model_name='podcastplaylist',
|
|
name='status',
|
|
field=models.BooleanField(default=True, verbose_name='status'),
|
|
),
|
|
migrations.AddField(
|
|
model_name='podcastplaylist',
|
|
name='thumbnail',
|
|
field=models.ImageField(blank=True, null=True, upload_to='podcast/playlist/thumbnails/', verbose_name='thumbnail'),
|
|
),
|
|
migrations.AddField(
|
|
model_name='podcastplaylist',
|
|
name='total_time',
|
|
field=models.DurationField(blank=True, null=True, verbose_name='total time'),
|
|
),
|
|
migrations.AddField(
|
|
model_name='podcastplaylist',
|
|
name='view_count',
|
|
field=models.PositiveBigIntegerField(default=0, verbose_name='view count'),
|
|
),
|
|
migrations.DeleteModel(
|
|
name='PodcastInCollection',
|
|
),
|
|
migrations.AddField(
|
|
model_name='podcastplaylistincollection',
|
|
name='collection',
|
|
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='collection_playlists', to='podcast.podcastcollection', verbose_name='collection'),
|
|
),
|
|
migrations.AddField(
|
|
model_name='podcastplaylistincollection',
|
|
name='playlist',
|
|
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='playlist_collections', to='podcast.podcastplaylist', verbose_name='playlist'),
|
|
),
|
|
migrations.AddField(
|
|
model_name='podcastplaylist',
|
|
name='collections',
|
|
field=models.ManyToManyField(blank=True, related_name='related_playlists', through='podcast.PodcastPlaylistInCollection', to='podcast.PodcastCollection', verbose_name='collections'),
|
|
),
|
|
migrations.AlterUniqueTogether(
|
|
name='podcastplaylistincollection',
|
|
unique_together={('collection', 'playlist')},
|
|
),
|
|
]
|