diff --git a/0002_alter_comment_is_enable.py b/0002_alter_comment_is_enable.py new file mode 100644 index 0000000..8bd50dc --- /dev/null +++ b/0002_alter_comment_is_enable.py @@ -0,0 +1,23 @@ +#zr 数据库迁移文件:修改评论是否显示字段的默认值 +# Generated by Django 4.1.7 on 2023-04-24 13:48 + +from django.db import migrations, models + +#zr 数据库迁移类 +class Migration(migrations.Migration): + + #zr 依赖的迁移文件 + dependencies = [ + ('comments', '0001_initial'), + ] + + #zr 迁移操作 + operations = [ + #zr 修改comment模型的is_enable字段 + migrations.AlterField( + model_name='comment', + name='is_enable', + #zr 将默认值改为False,并更新显示名称 + field=models.BooleanField(default=False, verbose_name='是否显示'), + ), + ]