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.
django/src/DjangoBlog-master/servermanager/migrations/0001_initial.py

56 lines
2.3 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.1.7 on 2023-03-02 07:14
#hz代码注释
from django.db import migrations, models
class Migration(migrations.Migration):
"""
Django数据库迁移类用于创建初始数据表结构
该迁移文件包含两个模型的创建操作:
1. commands模型 - 用于存储命令信息
2. EmailSendLog模型 - 用于记录邮件发送日志
"""
initial = True
dependencies = [
]
operations = [
# 创建commands数据表用于存储命令相关信息
migrations.CreateModel(
name='commands',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('title', models.CharField(max_length=300, verbose_name='命令标题')),
('command', models.CharField(max_length=2000, verbose_name='命令')),
('describe', models.CharField(max_length=300, verbose_name='命令描述')),
('created_time', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
('last_mod_time', models.DateTimeField(auto_now=True, verbose_name='修改时间')),
],
options={
'verbose_name': '命令',
'verbose_name_plural': '命令',
},
),
# 创建EmailSendLog数据表用于记录邮件发送日志信息
migrations.CreateModel(
name='EmailSendLog',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('emailto', models.CharField(max_length=300, verbose_name='收件人')),
('title', models.CharField(max_length=2000, verbose_name='邮件标题')),
('content', models.TextField(verbose_name='邮件内容')),
('send_result', models.BooleanField(default=False, verbose_name='结果')),
('created_time', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
],
options={
'verbose_name': '邮件发送log',
'verbose_name_plural': '邮件发送log',
'ordering': ['-created_time'],
},
),
]