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 ...@@ -3,31 +3,17 @@ from django.db import models
class Artist(models.Model): class Artist(models.Model):
artist_name = models.CharField(max_length=50, unique=True) birth_name = models.CharField(max_length=50, unique=True)
monthly_listeners = models.IntegerField() bio = models.TextField()
pass pass
class Album(models.Model): class Album(models.Model):
album_name = models.CharField(max_length=50, unique=True) label = models.CharField(max_length=50, unique=True)
artist = models.ForeignKey( song_count = models.IntegerField()
Artist,
on_delete=models.CASCADE,
)
description = models.CharField(max_length=500, unique=True)
release_date = models.DateField()
pass
class Song(models.Model): class Song(models.Model):
song_title = models.CharField(max_length=50) music_video = models.BooleanField()
artist = models.ForeignKey( lyrics = models.TextField()
Artist,
on_delete=models.CASCADE,
related_name='single'
)
album = models.ForeignKey(
Album,
on_delete=models.CASCADE,
)
song_length = models.TimeField()
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