Commit 42d15ae8 authored by Alvin Joshua Andrada's avatar Alvin Joshua Andrada

modified models

parent 11980b83
# Generated by Django 4.1.6 on 2023-02-20 15:49
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('homepage', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='album',
name='label',
field=models.CharField(default='label', max_length=100),
),
migrations.AddField(
model_name='album',
name='song_count',
field=models.IntegerField(default=1),
preserve_default=False,
),
migrations.AddField(
model_name='artist',
name='bio',
field=models.CharField(default='Bio', max_length=700),
preserve_default=False,
),
migrations.AddField(
model_name='artist',
name='birth_name',
field=models.CharField(default='birth name', max_length=100),
preserve_default=False,
),
migrations.AddField(
model_name='song',
name='lyrics',
field=models.CharField(default='lyrics', max_length=3000),
preserve_default=False,
),
]
# Generated by Django 4.1.6 on 2023-02-20 15:49
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('homepage', '0002_album_label_album_song_count_artist_bio_and_more'),
]
operations = [
migrations.AlterField(
model_name='album',
name='label',
field=models.CharField(max_length=100),
),
]
# Generated by Django 4.1.6 on 2023-02-20 15:50
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('homepage', '0003_alter_album_label'),
]
operations = [
migrations.AddField(
model_name='song',
name='music_video',
field=models.BooleanField(default=False),
preserve_default=False,
),
]
...@@ -3,13 +3,16 @@ from django.db import models ...@@ -3,13 +3,16 @@ from django.db import models
class Artist(models.Model): class Artist(models.Model):
artist_name = models.CharField(max_length=100) artist_name = models.CharField(max_length=100)
monthly_listeners = models.IntegerField() monthly_listeners = models.IntegerField()
birth_name = models.CharField(max_length=100)
bio = models.CharField(max_length=700)
class Album(models.Model): class Album(models.Model):
album_name = models.CharField(max_length=50) album_name = models.CharField(max_length=50)
artist = models.ForeignKey(Artist, on_delete=models.CASCADE) artist = models.ForeignKey(Artist, on_delete=models.CASCADE)
description = models.IntegerField() description = models.IntegerField()
release_date = models.CharField(max_length=50) release_date = models.CharField(max_length=50)
label = models.CharField(max_length=100)
song_count = models.IntegerField()
class Song(models.Model): class Song(models.Model):
...@@ -17,4 +20,6 @@ class Song(models.Model): ...@@ -17,4 +20,6 @@ class Song(models.Model):
artist = models.ForeignKey(Artist, on_delete=models.CASCADE) artist = models.ForeignKey(Artist, on_delete=models.CASCADE)
album = models.ForeignKey(Album, on_delete=models.CASCADE) album = models.ForeignKey(Album, on_delete=models.CASCADE)
song_length = models.IntegerField() song_length = models.IntegerField()
music_video = models.BooleanField()
lyrics = models.CharField(max_length=3000)
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