Commit 3dacf159 authored by Nics De Vega's avatar Nics De Vega

modified models

parent d67da527
# Generated by Django 4.1.6 on 2023-02-20 07:29
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('homepage', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='album',
name='song_count',
field=models.IntegerField(default=0),
),
migrations.AddField(
model_name='artist',
name='bio',
field=models.TextField(default='', max_length=700),
),
migrations.AddField(
model_name='artist',
name='birth_name',
field=models.CharField(default='', max_length=100, unique=True),
),
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=100),
),
migrations.AlterField(
model_name='album',
name='description',
field=models.TextField(default='', max_length=700),
),
migrations.AlterField(
model_name='artist',
name='artist_name',
field=models.CharField(default='', max_length=100, unique=True),
),
migrations.AlterField(
model_name='artist',
name='monthly_listeners',
field=models.IntegerField(default=0),
),
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=100),
),
]
# Generated by Django 4.1.6 on 2023-02-20 07:29
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('homepage', '0002_album_song_count_artist_bio_artist_birth_name_and_more'),
]
operations = [
migrations.AlterField(
model_name='album',
name='song_count',
field=models.IntegerField(default=0),
),
]
# Generated by Django 4.1.6 on 2023-02-20 07:32
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('homepage', '0003_alter_album_song_count'),
]
operations = [
migrations.AlterField(
model_name='album',
name='song_count',
field=models.IntegerField(),
),
]
# Generated by Django 4.1.6 on 2023-02-20 07:33
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('homepage', '0004_alter_album_song_count'),
]
operations = [
migrations.AlterField(
model_name='album',
name='song_count',
field=models.IntegerField(default=0),
),
]
# Generated by Django 4.1.6 on 2023-02-20 07:36
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('homepage', '0005_alter_album_song_count'),
]
operations = [
migrations.AlterField(
model_name='album',
name='song_count',
field=models.IntegerField(),
),
]
# Generated by Django 4.1.6 on 2023-02-20 07:36
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('homepage', '0006_alter_album_song_count'),
]
operations = [
migrations.AlterField(
model_name='album',
name='song_count',
field=models.IntegerField(default=0),
),
]
from django.db import models
class Artist(models.Model):
artist_name = models.TextField()
monthly_listeners = models.IntegerField()
artist_name = models.CharField(max_length=100,unique=True,default="")
birth_name = models.CharField(max_length=100,unique=True,default="")
bio = models.TextField(max_length=700,default="")
monthly_listeners = models.IntegerField(default=0)
class Album(models.Model):
album_name = models.TextField()
album_name = models.CharField(max_length=100,default="")
artist = models.ForeignKey(Artist, on_delete=models.CASCADE)
description = models.TextField()
description = models.TextField(max_length=700,default="")
release_date = models.DateField()
song_count = models.IntegerField(default=0)
class Song(models.Model):
song_title = models.TextField()
song_title = models.CharField(max_length=100,default="")
artist = models.ForeignKey(Artist, on_delete=models.CASCADE)
album = models.ForeignKey(Album, on_delete=models.CASCADE)
song_length = models.IntegerField()
song_length = models.IntegerField(default=0)
music_video = models.BooleanField(default=False)
lyrics = models.TextField(default="")
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