forked from erp-dev/erp
feat: added mdy stagging upload to tiia, and change outgoing_date to datetime type
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('api_v1', '0009_apiauditlog'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='MDYPlateOrderStagingTiiaUploadFailure',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('created_at', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
|
||||
('updated_at', models.DateTimeField(auto_now=True, verbose_name='更新时间')),
|
||||
('run_date', models.DateField(db_index=True, verbose_name='任务日期')),
|
||||
('mdy_rowid', models.CharField(db_index=True, max_length=64, verbose_name='明道云 RowID')),
|
||||
('staging_id', models.PositiveBigIntegerField(blank=True, db_index=True, null=True, verbose_name='暂存表ID')),
|
||||
('error', models.TextField(blank=True, verbose_name='错误摘要')),
|
||||
('details', models.JSONField(blank=True, default=list, help_text='通常存储上传 service 返回的失败条目列表', verbose_name='错误详情')),
|
||||
('attempts', models.PositiveIntegerField(default=0, verbose_name='尝试次数')),
|
||||
('last_attempt_at', models.DateTimeField(blank=True, null=True, verbose_name='最后尝试时间')),
|
||||
],
|
||||
options={
|
||||
'verbose_name': '开版暂存图片上传失败记录',
|
||||
'verbose_name_plural': '开版暂存图片上传失败记录',
|
||||
'db_table': 'api_mdy_plate_order_staging_tiia_upload_failure',
|
||||
'ordering': ['-created_at'],
|
||||
},
|
||||
),
|
||||
migrations.AddConstraint(
|
||||
model_name='mdyplateorderstagingtiiauploadfailure',
|
||||
constraint=models.UniqueConstraint(fields=('run_date', 'mdy_rowid'), name='uniq_mdy_po_staging_tiia_fail_run_date_rowid'),
|
||||
),
|
||||
]
|
||||
|
||||
18
api_v1/migrations/0011_alter_datasync_table_name.py
Normal file
18
api_v1/migrations/0011_alter_datasync_table_name.py
Normal file
@@ -0,0 +1,18 @@
|
||||
# Generated by Django 5.2.8 on 2026-01-22 07:51
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('api_v1', '0010_mdy_plate_order_staging_tiia_upload_failure'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='datasync',
|
||||
name='table_name',
|
||||
field=models.CharField(choices=[('product', '产品'), ('customer', '客户'), ('plate_order', '开版(明道云)'), ('mdy_plate_order_staging_tiia_upload', '开版暂存-腾讯图库上传')], max_length=50, verbose_name='同步目标'),
|
||||
),
|
||||
]
|
||||
Reference in New Issue
Block a user