Commit e2ab1a7d authored by Gabriel Geraldo's avatar Gabriel Geraldo

updated homepage models, altered field types

parent 023d45e2
Pipeline #2668 failed with stages
# Generated by Django 3.2 on 2023-02-13 12:46
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('homepage', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='album',
name='artist',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='homepage.artist'),
),
migrations.AlterField(
model_name='song',
name='album',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='homepage.album'),
),
migrations.AlterField(
model_name='song',
name='artist',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='homepage.artist'),
),
]
...@@ -8,13 +8,13 @@ class Artist(models.Model): ...@@ -8,13 +8,13 @@ class Artist(models.Model):
class Album(models.Model): class Album(models.Model):
album_name = models.TextField() album_name = models.TextField()
artist = models.TextField() artist = models.ForeignKey(Artist, on_delete = models.CASCADE)
description = models.TextField() description = models.TextField()
release_date = models.DateField() release_date = models.DateField()
class Song(models.Model): class Song(models.Model):
song_title = models.TextField() song_title = models.TextField()
artist = models.TextField() artist = models.ForeignKey(Artist, on_delete = models.CASCADE)
album = models.TextField() album = models.ForeignKey(Album, on_delete = models.CASCADE)
song_length = models.IntegerField() song_length = models.IntegerField()
\ 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