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.
git-test/comments/migrations/0002_alter_comment_is_enabl...

20 lines
695 B

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

# Generated by Django 4.1.7 on 2023-04-24 13:48
from django.db import migrations, models
# 数据库迁移:修改评论模型字段默认值
class Migration(migrations.Migration):
# 依赖项需要先执行comments应用的0001_initial迁移
dependencies = [
('comments', '0001_initial'),
]
# 数据库操作列表
operations = [
# 修改is_enable字段将默认值从True改为False评论默认不显示
migrations.AlterField(
model_name='comment',#模型名称
name='is_enable',#字段名称
field=models.BooleanField(default=False, verbose_name='是否显示'),# 新字段定义
),
]