Update models.py

parent 96c9a386
...@@ -4,7 +4,7 @@ class Artist(models.Model): ...@@ -4,7 +4,7 @@ class Artist(models.Model):
artist_name = models.CharField(max_length=50) artist_name = models.CharField(max_length=50)
monthly_listeners = models.IntegerField() monthly_listeners = models.IntegerField()
birth_name = models.CharField(max_length=50, null=True) birth_name = models.CharField(max_length=50, null=True)
bio = models.TextField(null=True) bio = models.TextField(max_length=700, null=True)
def __str__(self): def __str__(self):
return self.artist_name return self.artist_name
...@@ -12,7 +12,7 @@ class Artist(models.Model): ...@@ -12,7 +12,7 @@ class Artist(models.Model):
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.CharField(max_length=200) description = models.TextField(max_length=10000, null=True)
release_date = models.CharField(max_length=50) release_date = models.CharField(max_length=50)
label = models.CharField(max_length=50, null=True) label = models.CharField(max_length=50, null=True)
song_count = models.IntegerField(null=True) song_count = models.IntegerField(null=True)
...@@ -26,7 +26,7 @@ class Song(models.Model): ...@@ -26,7 +26,7 @@ class Song(models.Model):
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(null=True) music_video = models.BooleanField(null=True)
lyrics = models.TextField(max_length=10000, null=True) lyrics = models.TextField(max_length=5000, null=True)
def __str__(self): def __str__(self):
return self.song_title return self.song_title
\ No newline at end of file
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