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.
flyapps/fir_ser/api/migrations/0047_domaincnameinfo_userdo...

48 lines
2.2 KiB

# Generated by Django 3.0.3 on 2021-05-19 10:35
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('api', '0046_auto_20210423_1650'),
]
operations = [
migrations.CreateModel(
name='DomainCnameInfo',
fields=[
('domain_record',
models.CharField(max_length=128, primary_key=True, serialize=False, verbose_name='记录值')),
('ip_address', models.GenericIPAddressField(verbose_name='域名解析地址')),
('is_enable', models.BooleanField(default=True, verbose_name='是否启用该解析')),
('description', models.TextField(blank=True, default='', null=True, verbose_name='备注')),
('created_time', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
],
options={
'verbose_name': '分发域名信息',
'verbose_name_plural': '分发域名信息',
},
),
migrations.CreateModel(
name='UserDomainInfo',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('domain_name', models.CharField(db_index=True, max_length=64, verbose_name='下载页面域名')),
('is_enable', models.BooleanField(default=False, verbose_name='绑定成功')),
('created_time', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
('cname_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.DomainCnameInfo',
verbose_name='cname解析ID')),
('user_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL,
verbose_name='用户ID')),
],
options={
'verbose_name': '分发域名绑定',
'verbose_name_plural': '分发域名绑定',
'unique_together': {('domain_name', 'is_enable')},
},
),
]