Update 0002_alter_comment_is_enable.py

master
pk6lqz7py 2 weeks ago
parent b9b655aa20
commit 8cd61ac127

@ -1,18 +1,29 @@
#zyl
# Generated by Django 4.1.7 on 2023-04-24 13:48
from django.db import migrations, models
class Migration(migrations.Migration):
"""
修改 Comment 模型 is_enable 字段的默认值
"""
# 定义此迁移依赖的迁移文件
dependencies = [
# 依赖 comments 应用的 0001_initial 初始迁移
('comments', '0001_initial'),
]
# 定义迁移操作列表
operations = [
# 修改 Comment 模型的 is_enable 字段
migrations.AlterField(
model_name='comment',
name='is_enable',
model_name='comment', # 要修改的模型名称
name='is_enable', # 要修改的字段名称
# 新的字段定义:仅修改 default 参数,将默认值从 True 改为 False
# verbose_name 保持不变
field=models.BooleanField(default=False, verbose_name='是否显示'),
),
]

Loading…
Cancel
Save