u
This commit is contained in:
@@ -21,13 +21,13 @@ export default function setOff(provider) {
|
||||
? SQLITE_LIST_CATEGORY_IDS
|
||||
: MSSQL_LIST_CATEGORY_IDS;
|
||||
|
||||
const addCategoryTombstoneSql = `
|
||||
INSERT INTO posterminaltombstone (posterminal_id, entity_type, entity_id)
|
||||
const addCategoryObituarySql = `
|
||||
INSERT INTO posterminalobituary (posterminal_id, entity_type, entity_id)
|
||||
VALUES (@posterminalId, 'category', @categoryId)
|
||||
`;
|
||||
|
||||
const addArticleTombstonesSql = `
|
||||
INSERT INTO posterminaltombstone (posterminal_id, entity_type, entity_id)
|
||||
const addArticleObituariesSql = `
|
||||
INSERT INTO posterminalobituary (posterminal_id, entity_type, entity_id)
|
||||
SELECT DISTINCT @posterminalId, 'article', ca.article_id
|
||||
FROM categoryarticle ca
|
||||
WHERE ca.category_id = @categoryId
|
||||
@@ -69,12 +69,12 @@ export default function setOff(provider) {
|
||||
throw new Error('Posterminal not found');
|
||||
}
|
||||
|
||||
await runner.query(addCategoryTombstoneSql, {
|
||||
await runner.query(addCategoryObituarySql, {
|
||||
posterminalId,
|
||||
categoryId,
|
||||
});
|
||||
|
||||
await runner.query(addArticleTombstonesSql, {
|
||||
await runner.query(addArticleObituariesSql, {
|
||||
posterminalId,
|
||||
categoryId,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user