39 lines
1.6 KiB
Python
39 lines
1.6 KiB
Python
# Generated by Django 5.2.7 on 2026-01-29 21:05
|
|
|
|
import django.db.models.deletion
|
|
from django.db import migrations, models
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
initial = True
|
|
|
|
dependencies = [
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name='Station',
|
|
fields=[
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('name', models.CharField(max_length=100)),
|
|
('stream_url', models.URLField(help_text='URL for the radio stream')),
|
|
('description', models.TextField(blank=True)),
|
|
('color', models.CharField(default='#FF007F', help_text='Hex color for the vinyl', max_length=7)),
|
|
('image', models.FileField(blank=True, null=True, upload_to='stations/')),
|
|
('is_active', models.BooleanField(default=True)),
|
|
],
|
|
),
|
|
migrations.CreateModel(
|
|
name='Track',
|
|
fields=[
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('title', models.CharField(max_length=200)),
|
|
('artist', models.CharField(max_length=200)),
|
|
('audio_file', models.FileField(blank=True, null=True, upload_to='tracks/')),
|
|
('created_at', models.DateTimeField(auto_now_add=True)),
|
|
('station', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='tracks', to='core.station')),
|
|
],
|
|
),
|
|
]
|