fix(admin): use (url_path, language) conflict target in _sync_static_articles
Migration 0030 dropped UNIQUE(slug) in favor of UNIQUE(url_path, language), but _sync_static_articles still used ON CONFLICT(slug), causing test failure. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -2268,10 +2268,9 @@ async def _sync_static_articles() -> None:
|
||||
(slug, title, url_path, language, meta_description,
|
||||
status, template_slug, group_key, article_type, created_at, updated_at)
|
||||
VALUES (?, ?, ?, ?, ?, 'draft', ?, ?, ?, ?, ?)
|
||||
ON CONFLICT(slug) DO UPDATE SET
|
||||
ON CONFLICT(url_path, language) DO UPDATE SET
|
||||
title = excluded.title,
|
||||
url_path = excluded.url_path,
|
||||
language = excluded.language,
|
||||
slug = excluded.slug,
|
||||
meta_description = excluded.meta_description,
|
||||
template_slug = excluded.template_slug,
|
||||
group_key = excluded.group_key,
|
||||
|
||||
Reference in New Issue
Block a user