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.
40 lines
1.3 KiB
40 lines
1.3 KiB
# Generated by Django 4.1.1 on 2022-09-23 16:26 |
|
|
|
from django.db import migrations, models |
|
import django.db.models.deletion |
|
import django.utils.timezone |
|
|
|
|
|
class Migration(migrations.Migration): |
|
|
|
dependencies = [ |
|
('article', '0002_article_author'), |
|
] |
|
|
|
operations = [ |
|
migrations.CreateModel( |
|
name='Category', |
|
fields=[ |
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), |
|
('title', models.CharField(max_length=100)), |
|
('created', models.DateTimeField(default=django.utils.timezone.now)), |
|
], |
|
options={ |
|
'ordering': ['-created'], |
|
}, |
|
), |
|
migrations.AlterModelOptions( |
|
name='article', |
|
options={'ordering': ['-created']}, |
|
), |
|
migrations.AlterField( |
|
model_name='article', |
|
name='id', |
|
field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'), |
|
), |
|
migrations.AddField( |
|
model_name='article', |
|
name='category', |
|
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='articles', to='article.category'), |
|
), |
|
]
|
|
|