You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
1.2 KiB
35 lines
1.2 KiB
1 year ago
|
# Generated by Django 4.2.4 on 2023-09-05 00:33
|
||
|
|
||
|
from django.db import migrations, models
|
||
|
import django.db.models.deletion
|
||
|
|
||
|
|
||
|
class Migration(migrations.Migration):
|
||
|
|
||
|
initial = True
|
||
|
|
||
|
dependencies = [
|
||
|
]
|
||
|
|
||
|
operations = [
|
||
|
migrations.CreateModel(
|
||
|
name='Musician',
|
||
|
fields=[
|
||
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||
|
('first_name', models.CharField(max_length=50)),
|
||
|
('last_name', models.CharField(max_length=50)),
|
||
|
('instrument', models.CharField(max_length=100)),
|
||
|
],
|
||
|
),
|
||
|
migrations.CreateModel(
|
||
|
name='Album',
|
||
|
fields=[
|
||
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||
|
('name', models.CharField(max_length=100)),
|
||
|
('release_date', models.DateField()),
|
||
|
('num_stars', models.IntegerField()),
|
||
|
('artist', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='album_musician', to='music.musician')),
|
||
|
],
|
||
|
),
|
||
|
]
|