|
|
|
|
@ -1,18 +1,17 @@
|
|
|
|
|
# Generated by Django 4.1.7 on 2023-04-24 13:48
|
|
|
|
|
from django.db import migrations, models # gst: 导入数据库迁移和模型字段相关模块
|
|
|
|
|
|
|
|
|
|
from django.db import migrations, models
|
|
|
|
|
|
|
|
|
|
class Migration(migrations.Migration): # gst: 定义迁移类,管理数据库模型的修改操作
|
|
|
|
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
|
|
|
|
|
|
dependencies = [
|
|
|
|
|
('comments', '0001_initial'),
|
|
|
|
|
dependencies = [ # gst: 迁移依赖项,指定执行当前迁移前需完成的其他迁移
|
|
|
|
|
('comments', '0001_initial'), # gst: 依赖comments应用的0001号初始迁移(确保Comment模型已存在)
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
operations = [
|
|
|
|
|
migrations.AlterField(
|
|
|
|
|
model_name='comment',
|
|
|
|
|
name='is_enable',
|
|
|
|
|
field=models.BooleanField(default=False, verbose_name='是否显示'),
|
|
|
|
|
operations = [ # gst: 迁移操作列表,定义当前迁移要执行的数据库操作
|
|
|
|
|
migrations.AlterField( # gst: 执行“修改字段”的迁移操作
|
|
|
|
|
model_name='comment', # gst: 要修改的模型名称(Comment)
|
|
|
|
|
name='is_enable', # gst: 要修改的字段名称(是否显示字段)
|
|
|
|
|
field=models.BooleanField(default=False, verbose_name='是否显示'), # gst: 修改后字段类型为布尔型,默认值改为False,后台显示名称为“是否显示”
|
|
|
|
|
),
|
|
|
|
|
]
|
|
|
|
|
]
|