Add articlehistory on updateBySku and getHistoryBySku

This commit is contained in:
seb
2026-08-05 09:17:17 +02:00
parent 530efa4f09
commit 46c85fe29e
6 changed files with 112 additions and 4 deletions

11
src/sql/articlehistory.js Normal file
View File

@@ -0,0 +1,11 @@
export const INSERT = `
INSERT INTO articlehistory (article_id, [text])
VALUES (@articleId, @text)
`;
export const LIST_BY_ARTICLE_ID = `
SELECT id, [date], [text]
FROM articlehistory
WHERE article_id = @articleId
ORDER BY [date] DESC, id DESC
`;