lty/qy_lty/aiapp/migrations/0004_credentialslot.py
pmc a475fe4600 feat(01-01): 自动生成并应用 0004_credentialslot 迁移
- 由 python manage.py makemigrations aiapp 自动生成(未手写)
- CreateModel(name='CredentialSlot') 含 id/app_id/access_token/updated_at 四列
- python manage.py migrate aiapp 退出码 0;showmigrations 显示 [X]
- shell 自检:首访 created=True app_id='' / 二次 save 后 count=1 obj2.pk=1
- N 次 save 守恒断言通过:CredentialSlot.objects.count() == 1
- 探针数据已写入 DB:pk=1 / app_id='probe_app' / access_token='probe_secret_xxxx'
  (Plan 02 Task 2 浏览器 checkpoint 依赖此值,对应脱敏期望串 *************xxxx)
- 覆盖需求 CRED-01 数据库 schema 落地
2026-05-07 17:35:58 +08:00

27 lines
1.1 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Generated by Django 5.2.12 on 2026-05-07 09:34
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('aiapp', '0003_create_rtc_bot'),
]
operations = [
migrations.CreateModel(
name='CredentialSlot',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('app_id', models.CharField(blank=True, default='', help_text='第三方服务商分配的 APP ID运营在 Admin 录入', max_length=128, verbose_name='APP ID')),
('access_token', models.CharField(blank=True, default='', help_text='第三方服务商访问令牌DB 明文存储Admin 列表/查看态末 4 位脱敏', max_length=512, verbose_name='Access Token')),
('updated_at', models.DateTimeField(auto_now=True, verbose_name='更新时间')),
],
options={
'verbose_name': '凭据槽位',
'verbose_name_plural': '凭据槽位',
},
),
]