Commit c034892c authored by Star Neptune R. Sy's avatar Star Neptune R. Sy

migrated the database of about.models. I forgot to do it last commit

parent 86b0e8e0
# Generated by Django 3.2 on 2023-02-16 16:05
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('about', '0002_subject'),
]
operations = [
migrations.CreateModel(
name='Album',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('album_name', models.CharField(max_length=50, unique=True)),
('description', models.CharField(max_length=500, unique=True)),
('release_date', models.DateField()),
],
),
migrations.CreateModel(
name='Artist',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('artist_name', models.CharField(max_length=50, unique=True)),
('monthly_listeners', models.IntegerField()),
],
),
migrations.CreateModel(
name='Song',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('song_title', models.CharField(max_length=50)),
('song_length', models.TimeField()),
('album', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='about.album')),
('artist', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='single', to='about.artist')),
],
),
migrations.DeleteModel(
name='IndexCard',
),
migrations.DeleteModel(
name='Subject',
),
migrations.AddField(
model_name='album',
name='artist',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='about.artist'),
),
]
......@@ -13,7 +13,6 @@ class Album(models.Model):
artist = models.ForeignKey(
Artist,
on_delete=models.CASCADE,
related_name='song'
)
description = models.CharField(max_length=500, unique=True)
release_date = models.DateField()
......@@ -25,7 +24,7 @@ class Song(models.Model):
artist = models.ForeignKey(
Artist,
on_delete=models.CASCADE,
related_name='song'
related_name='single'
)
album = models.ForeignKey(
Album,
......
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