Commit 1d0450d6 authored by Star Neptune R. Sy's avatar Star Neptune R. Sy

updated the models. Some don't work

parent 8e31b4bc
# Generated by Django 3.2 on 2023-02-21 14:19
from django.db import migrations, models
import django.utils.timezone
class Migration(migrations.Migration):
dependencies = [
('about', '0003_auto_20230217_0005'),
]
operations = [
migrations.RemoveField(
model_name='album',
name='album_name',
),
migrations.RemoveField(
model_name='album',
name='artist',
),
migrations.RemoveField(
model_name='album',
name='description',
),
migrations.RemoveField(
model_name='album',
name='release_date',
),
migrations.RemoveField(
model_name='artist',
name='artist_name',
),
migrations.RemoveField(
model_name='artist',
name='monthly_listeners',
),
migrations.RemoveField(
model_name='song',
name='album',
),
migrations.RemoveField(
model_name='song',
name='artist',
),
migrations.RemoveField(
model_name='song',
name='song_length',
),
migrations.RemoveField(
model_name='song',
name='song_title',
),
migrations.AddField(
model_name='album',
name='label',
field=models.CharField(default=django.utils.timezone.now, max_length=50, unique=True),
preserve_default=False,
),
migrations.AddField(
model_name='album',
name='song_count',
field=models.IntegerField(default=django.utils.timezone.now),
preserve_default=False,
),
migrations.AddField(
model_name='artist',
name='bio',
field=models.TextField(default=django.utils.timezone.now),
preserve_default=False,
),
migrations.AddField(
model_name='artist',
name='birth_name',
field=models.CharField(default=django.utils.timezone.now, max_length=50, unique=True),
preserve_default=False,
),
migrations.AddField(
model_name='song',
name='lyrics',
field=models.TextField(default=django.utils.timezone.now),
preserve_default=False,
),
migrations.AddField(
model_name='song',
name='music_video',
field=models.BooleanField(default=django.utils.timezone.now),
preserve_default=False,
),
]
......@@ -3,31 +3,17 @@ from django.db import models
class Artist(models.Model):
artist_name = models.CharField(max_length=50, unique=True)
monthly_listeners = models.IntegerField()
birth_name = models.CharField(max_length=50, unique=True)
bio = models.TextField()
pass
class Album(models.Model):
album_name = models.CharField(max_length=50, unique=True)
artist = models.ForeignKey(
Artist,
on_delete=models.CASCADE,
)
description = models.CharField(max_length=500, unique=True)
release_date = models.DateField()
pass
label = models.CharField(max_length=50, unique=True)
song_count = models.IntegerField()
class Song(models.Model):
song_title = models.CharField(max_length=50)
artist = models.ForeignKey(
Artist,
on_delete=models.CASCADE,
related_name='single'
)
album = models.ForeignKey(
Album,
on_delete=models.CASCADE,
)
song_length = models.TimeField()
music_video = models.BooleanField()
lyrics = models.TextField()
Markdown is supported
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