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 落地
This commit is contained in:
parent
30c7caff41
commit
a475fe4600
26
qy_lty/aiapp/migrations/0004_credentialslot.py
Normal file
26
qy_lty/aiapp/migrations/0004_credentialslot.py
Normal file
@ -0,0 +1,26 @@
|
||||
# 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': '凭据槽位',
|
||||
},
|
||||
),
|
||||
]
|
||||
Loading…
x
Reference in New Issue
Block a user