This commit is contained in:
seb
2026-10-22 14:39:45 +02:00
parent 9495ad51cc
commit e9b4ac5d79
31 changed files with 3405 additions and 3392 deletions

View File

@@ -21,15 +21,15 @@ export default function setOffAll(provider) {
? SQLITE_LIST_CATEGORY_IDS
: MSSQL_LIST_CATEGORY_IDS;
const addCategoryTombstonesSql = `
INSERT INTO posterminaltombstone (posterminal_id, entity_type, entity_id)
const addCategoryObituariesSql = `
INSERT INTO posterminalobituary (posterminal_id, entity_type, entity_id)
SELECT posterminal_id, 'category', category_id
FROM posterminalcategory
WHERE posterminal_id = @posterminalId
`;
const addArticleTombstonesSql = `
INSERT INTO posterminaltombstone (posterminal_id, entity_type, entity_id)
const addArticleObituariesSql = `
INSERT INTO posterminalobituary (posterminal_id, entity_type, entity_id)
SELECT DISTINCT pc.posterminal_id, 'article', ca.article_id
FROM posterminalcategory pc
INNER JOIN categoryarticle ca ON ca.category_id = pc.category_id
@@ -64,8 +64,8 @@ export default function setOffAll(provider) {
throw new Error('Posterminal not found');
}
await runner.query(addCategoryTombstonesSql, { posterminalId });
await runner.query(addArticleTombstonesSql, { posterminalId });
await runner.query(addCategoryObituariesSql, { posterminalId });
await runner.query(addArticleObituariesSql, { posterminalId });
await runner.query(setOffAllSql, { posterminalId });