feat(qa): 周报邮件区分主送抄送并附统计看板图片
build / build (push) Successful in 1m21s

设置新增抄送列表,MIME 增加 Cc 头、envelope 同时投递主送与抄送,同一地址不得同时出现在两边。
确认后可保存统计看板 PNG(multipart/related + cid),发送时放在正文末尾内联显示;正文改动使确认失效后不再使用旧图。
This commit is contained in:
hermes
2026-10-26 15:59:06 +08:00
parent 600e9a2dc2
commit 822fb652ff
13 changed files with 325 additions and 25 deletions
@@ -0,0 +1 @@
alter table qa_weekly_email_settings drop column if exists cc_recipients;
@@ -0,0 +1,2 @@
-- 主送与抄送分开:抄送只影响收件头与 envelope,不影响发送规则。
alter table qa_weekly_email_settings add column if not exists cc_recipients text[] not null default '{}';
@@ -0,0 +1,3 @@
alter table qa_weekly_confirmations drop column if exists dashboard_saved_at;
alter table qa_weekly_confirmations drop column if exists dashboard_sha256;
alter table qa_weekly_confirmations drop column if exists dashboard_png;
@@ -0,0 +1,4 @@
-- 周报邮件附图:确认时保存当时导出的看板 PNG,发送时作为内嵌图片放在正文之后。
alter table qa_weekly_confirmations add column if not exists dashboard_png bytea;
alter table qa_weekly_confirmations add column if not exists dashboard_sha256 text not null default '';
alter table qa_weekly_confirmations add column if not exists dashboard_saved_at timestamptz;
@@ -11,8 +11,8 @@ func TestEmbeddedMigrationsAreVersionSorted(t *testing.T) {
if err != nil {
t.Fatalf("loadMigrations() error = %v", err)
}
if len(migrations) != 60 {
t.Fatalf("migration count = %d, want 60", len(migrations))
if len(migrations) != 62 {
t.Fatalf("migration count = %d, want 62", len(migrations))
}
if migrations[0].Version != 1 || !strings.Contains(migrations[0].UpSQL, "CREATE TABLE IF NOT EXISTS jobs") {
t.Fatalf("migration 1 = %#v", migrations[0])