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.
DjangoBlog/servermanager/migrations/0002_alter_emailsendlog_opt...

37 lines
2.2 KiB

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.2.5 on 2023-09-06 13:19
# 说明此文件由Django 4.2.5版本自动生成生成时间为2023年9月6日13:19
# 作用:记录数据库模型的修改操作(字段重命名、配置调整等),用于同步数据库结构变更
from django.db import migrations
# 马莹导入Django迁移模块
class Migration(migrations.Migration):
# 马莹:迁移类,所有数据库变更操作在此定义
dependencies = [ # 马莹:依赖的前置迁移文件:表示必须先执行'servermanager'应用的'0001_initial'迁移
# 马莹:才能执行当前迁移(确保修改的是已存在的模型)
('servermanager', '0001_initial'),
]
operations = [ # 马莹:迁移操作列表:包含对模型的修改操作
migrations.AlterModelOptions( # 马莹:修改'EmailSendLog'模型的元配置
name='emailsendlog',
options={'ordering': ['-creation_time'], 'verbose_name': '邮件发送log', 'verbose_name_plural': '邮件发送log'},
), # 马莹1. 排序方式变更:按'creation_time'字段倒序排列(最新记录在前)
# (原配置可能是按其他字段排序,此处同步字段名变更后的排序)
# 马莹2. 模型显示名称(单数和复数)保持不变
migrations.RenameField( # 马莹:重命名'commands'模型的字段
model_name='commands',
old_name='created_time', # 马莹:原字段名:创建时间
new_name='creation_time', # 马莹:新字段名:创建时间(更简洁的命名)
),
migrations.RenameField( # 马莹:重命名'commands'模型的另一个字段
model_name='commands',
old_name='last_mod_time', # 马莹:重命名'commands'模型的另一个字段
new_name='last_modify_time', # 马莹:重命名'commands'模型的另一个字段
),
migrations.RenameField( # 马莹:重命名'commands'模型的另一个字段
model_name='emailsendlog',
old_name='created_time', # 马莹:原字段名:创建时间
new_name='creation_time', # 马莹新字段名创建时间与commands模型保持命名一致
),
]