36 lines
1.2 KiB
Python
36 lines
1.2 KiB
Python
# Generated by Django 4.0 on 2022-04-29 06:43
|
|
|
|
from django.db import migrations, models
|
|
import django.db.models.deletion
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
initial = True
|
|
|
|
dependencies = [
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name='Post',
|
|
fields=[
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('title', models.CharField(max_length=200, unique=True)),
|
|
('author', models.CharField(max_length=20)),
|
|
('content', models.TextField()),
|
|
('created_at', models.DateTimeField(auto_now_add=True)),
|
|
],
|
|
),
|
|
migrations.CreateModel(
|
|
name='Comment',
|
|
fields=[
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('name', models.CharField(max_length=20)),
|
|
('content', models.TextField()),
|
|
('created_at', models.DateTimeField(auto_now_add=True)),
|
|
('post', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='website.post')),
|
|
],
|
|
),
|
|
]
|