Commit 9edcf77c authored by Star Neptune R. Sy's avatar Star Neptune R. Sy

Models are no longer asking for defaults on the terminal

parent a7136615
# Generated by Django 3.2 on 2023-02-16 16:05
# Generated by Django 3.2 on 2023-02-23 13:03
import datetime
from django.db import migrations, models
import django.db.models.deletion
......@@ -7,7 +8,7 @@ import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('about', '0002_subject'),
('about', '0001_initial'),
]
operations = [
......@@ -15,38 +16,41 @@ class Migration(migrations.Migration):
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()),
('album_name', models.CharField(blank=True, max_length=50, unique=True)),
('description', models.CharField(blank=True, max_length=500, unique=True)),
('release_date', models.DateField(default=datetime.datetime(2023, 2, 23, 21, 3, 39, 527553))),
('label', models.CharField(blank=True, max_length=50, unique=True)),
('song_count', models.IntegerField(blank=True)),
],
),
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()),
('artist_name', models.CharField(blank=True, max_length=50, unique=True)),
('monthly_listeners', models.IntegerField(default=1)),
('birth_name', models.CharField(blank=True, max_length=50, unique=True)),
('bio', models.TextField(blank=True)),
],
),
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')),
('song_title', models.CharField(blank=True, max_length=50)),
('song_length', models.TimeField(default=datetime.datetime(2023, 2, 23, 21, 3, 39, 527552))),
('music_video', models.BooleanField(default=False)),
('lyrics', models.TextField(blank=True)),
('album', models.ForeignKey(default='justToMakeItWorkToo', on_delete=django.db.models.deletion.CASCADE, to='about.album')),
('artist', models.ForeignKey(default='justToMakeItWork', 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'),
field=models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, to='about.artist'),
),
]
# Generated by Django 3.2 on 2023-02-16 15:45
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('about', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='Subject',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=50)),
('teacher_name', models.CharField(max_length=50)),
('units', models.IntegerField()),
],
),
]
# Generated by Django 3.2 on 2023-02-21 14:19
from django.db import migrations, models
import django.utils.timezone
class Migration(migrations.Migration):
dependencies = [
('about', '0003_auto_20230217_0005'),
]
operations = [
migrations.RemoveField(
model_name='album',
name='album_name',
),
migrations.RemoveField(
model_name='album',
name='artist',
),
migrations.RemoveField(
model_name='album',
name='description',
),
migrations.RemoveField(
model_name='album',
name='release_date',
),
migrations.RemoveField(
model_name='artist',
name='artist_name',
),
migrations.RemoveField(
model_name='artist',
name='monthly_listeners',
),
migrations.RemoveField(
model_name='song',
name='album',
),
migrations.RemoveField(
model_name='song',
name='artist',
),
migrations.RemoveField(
model_name='song',
name='song_length',
),
migrations.RemoveField(
model_name='song',
name='song_title',
),
migrations.AddField(
model_name='album',
name='label',
field=models.CharField(default=django.utils.timezone.now, max_length=50, unique=True),
preserve_default=False,
),
migrations.AddField(
model_name='album',
name='song_count',
field=models.IntegerField(default=django.utils.timezone.now),
preserve_default=False,
),
migrations.AddField(
model_name='artist',
name='bio',
field=models.TextField(default=django.utils.timezone.now),
preserve_default=False,
),
migrations.AddField(
model_name='artist',
name='birth_name',
field=models.CharField(default=django.utils.timezone.now, max_length=50, unique=True),
preserve_default=False,
),
migrations.AddField(
model_name='song',
name='lyrics',
field=models.TextField(default=django.utils.timezone.now),
preserve_default=False,
),
migrations.AddField(
model_name='song',
name='music_video',
field=models.BooleanField(default=django.utils.timezone.now),
preserve_default=False,
),
]
# about/models.py
from django.db import models
import datetime
class Artist(models.Model):
artist_name = models.CharField(max_length=50, unique=True)
monthly_listeners = models.IntegerField()
birth_name = models.CharField(max_length=50, unique=True)
bio = models.TextField(null=False)
artist_name = models.CharField(max_length=50, unique=True,blank=True)
monthly_listeners = models.IntegerField(default=1)
birth_name = models.CharField(max_length=50, unique=True, blank=True,)
bio = models.TextField(blank=True,)
pass
class Album(models.Model):
album_name = models.CharField(max_length=50, unique=True)
album_name = models.CharField(max_length=50, unique=True, blank=True,)
artist = models.ForeignKey(
Artist,
on_delete=models.CASCADE,
default=1
)
description = models.CharField(max_length=500, unique=True)
release_date = models.DateField()
label = models.CharField(max_length=50, unique=True)
song_count = models.IntegerField()
description = models.CharField(max_length=500, unique=True, blank=True,)
release_date = models.DateField(default=datetime.datetime.today())
label = models.CharField(max_length=50, unique=True, blank=True,)
song_count = models.IntegerField(blank=True,)
pass
class Song(models.Model):
song_title = models.CharField(max_length=50)
song_title = models.CharField(max_length=50, blank=True,)
artist = models.ForeignKey(
Artist,
on_delete=models.CASCADE,
related_name='single'
related_name='single',
default="justToMakeItWork",
)
album = models.ForeignKey(
Album,
on_delete=models.CASCADE,
default="justToMakeItWorkToo",
)
song_length = models.TimeField()
music_video = models.BooleanField()
lyrics = models.TextField()
\ No newline at end of file
song_length = models.TimeField(default=datetime.datetime.now())
music_video = models.BooleanField(default=False)
lyrics = models.TextField(blank=True,)
\ 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