34 lines
1.2 KiB
Python
34 lines
1.2 KiB
Python
# Generated by Django 5.1.1 on 2024-09-17 09:19
|
|
|
|
import django.db.models.deletion
|
|
import django.utils.timezone
|
|
from django.conf import settings
|
|
from django.db import migrations, models
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
initial = True
|
|
|
|
dependencies = [
|
|
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name='Board',
|
|
fields=[
|
|
('id', models.AutoField(primary_key=True, serialize=False)),
|
|
('name', models.CharField(max_length=50, verbose_name='留言用户')),
|
|
('email', models.CharField(max_length=50, verbose_name='邮箱地址')),
|
|
('content', models.CharField(max_length=500, verbose_name='留言内容')),
|
|
('created', models.DateTimeField(default=django.utils.timezone.now, verbose_name='创建时间')),
|
|
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='用户')),
|
|
],
|
|
options={
|
|
'verbose_name': '博客留言',
|
|
'verbose_name_plural': '博客留言',
|
|
},
|
|
),
|
|
]
|