Commit 9a18b821 authored by Eldon Dagdag's avatar Eldon Dagdag

Updated and Added Attributes in Models

parent 14474cbf
No preview for this file type
# Generated by Django 3.2 on 2023-02-20 07:17
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=255),
),
migrations.AddField(
model_name='album',
name='song_count',
field=models.IntegerField(default=0),
),
migrations.AddField(
model_name='artist',
name='bio',
field=models.TextField(blank=True, default='', max_length=700),
),
migrations.AddField(
model_name='artist',
name='birth_name',
field=models.CharField(default='', max_length=255),
),
migrations.AddField(
model_name='song',
name='lyrics',
field=models.TextField(default=''),
),
migrations.AddField(
model_name='song',
name='music_video',
field=models.BooleanField(default=False),
),
migrations.AlterField(
model_name='album',
name='album_name',
field=models.CharField(default='', max_length=255),
),
migrations.AlterField(
model_name='album',
name='artist',
field=models.CharField(default='', max_length=255),
),
migrations.AlterField(
model_name='album',
name='description',
field=models.TextField(default=''),
),
migrations.AlterField(
model_name='artist',
name='artist_name',
field=models.CharField(default='', max_length=255),
),
migrations.AlterField(
model_name='artist',
name='monthly_listeners',
field=models.IntegerField(default=0),
),
migrations.AlterField(
model_name='song',
name='album',
field=models.CharField(default='', max_length=255),
),
migrations.AlterField(
model_name='song',
name='artist',
field=models.CharField(default='', max_length=255),
),
migrations.AlterField(
model_name='song',
name='song_length',
field=models.IntegerField(default=0),
),
migrations.AlterField(
model_name='song',
name='song_title',
field=models.CharField(default='', max_length=255),
),
]
from django.db import models 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=255, default="")
monthly_listeners = models.IntegerField() birth_name = models.CharField(max_length=255, default="")
monthly_listeners = models.IntegerField(default=0)
bio = models.TextField(max_length=700, blank=True, default="")
class Album(models.Model): class Album(models.Model):
album_name = models.CharField(max_length=100) album_name = models.CharField(max_length=255, default="")
artist = models.CharField(max_length=100) artist = models.CharField(max_length=255, default="")
description = models.CharField(max_length=500) description = models.TextField(default="")
release_date = models.DateField() release_date = models.DateField()
label = models.CharField(max_length=255, default="")
song_count = models.IntegerField(default=0)
class Song(models.Model): class Song(models.Model):
song_title = models.CharField(max_length=100) song_title = models.CharField(max_length=255, default="")
artist = models.CharField(max_length=100) artist = models.CharField(max_length=255, default="")
album = models.CharField(max_length=100) album = models.CharField(max_length=255, default="")
song_length = models.IntegerField() song_length = models.IntegerField(default=0)
music_video = models.BooleanField(default=False)
lyrics = models.TextField(default="")
# Create your models here. # Create your models here.
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