Commit 0a9f0cb9 authored by Javi Ng's avatar Javi Ng

made migrations

parent e5e3835a
No preview for this file type
# Generated by Django 3.2 on 2023-02-20 05:47
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='', max_length=100),
),
migrations.AddField(
model_name='album',
name='song_count',
field=models.CharField(default=0, max_length=50),
),
migrations.AddField(
model_name='artist',
name='bio',
field=models.CharField(default='', max_length=700),
),
migrations.AddField(
model_name='artist',
name='birth_name',
field=models.CharField(default='', max_length=100),
),
migrations.AddField(
model_name='song',
name='lyrics',
field=models.CharField(default='', max_length=1000),
),
migrations.AddField(
model_name='song',
name='music_video',
field=models.BooleanField(default=False),
),
]
......@@ -4,8 +4,8 @@ from django.db import models
class Artist(models.Model):
artist_name = models.CharField(max_length = 50)
monthly_listeners = models.IntegerField(default = 0)
birth_name = models.CharField(max_length = 100)
bio = models.CharField(max_length = 700)
birth_name = models.CharField(max_length = 100, default = "")
bio = models.CharField(max_length = 700, default = "")
def __str__(self):
return self.artist_name
......@@ -14,8 +14,8 @@ class Album(models.Model):
album_name = models.CharField(max_length = 100)
artist = models.ForeignKey(Artist, on_delete = models.CASCADE)
description = models.CharField(max_length = 500)
label = models.CharField(max_length = 100)
song_count = models.CharField(max_length = 50)
label = models.CharField(max_length = 100, default = "")
song_count = models.CharField(max_length = 50, default = 0)
release_date = models.DateTimeField("Date Released")
def __str__(self):
......@@ -25,7 +25,7 @@ class Song(models.Model):
song_title = models.CharField(max_length = 100)
artist = models.ForeignKey(Artist, on_delete = models.CASCADE)
album = models.ForeignKey(Album, on_delete = models.CASCADE)
lyrics = models.CharField(max_length = 1000)
lyrics = models.CharField(max_length = 1000, default = "")
song_length = models.IntegerField(default = 0)
music_video = models.BooleanField(default = False)
......
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