u
This commit is contained in:
@@ -1,17 +1,17 @@
|
||||
export const INSERT = `
|
||||
INSERT INTO articlehistory (article_id, companyuser_id, [text])
|
||||
VALUES (@articleId, @companyuserId, @text)
|
||||
INSERT INTO articlehistory (article_id, companyuser_id, [date], [text], meta)
|
||||
VALUES (@articleId, @companyuserId, COALESCE(@date, SYSUTCDATETIME()), @text, @meta)
|
||||
`;
|
||||
|
||||
export const LIST_BY_ARTICLE_ID = `
|
||||
SELECT id, companyuser_id AS companyuserId, [date], [text]
|
||||
SELECT id, companyuser_id AS companyuserId, [date], [text], meta
|
||||
FROM articlehistory
|
||||
WHERE article_id = @articleId
|
||||
ORDER BY [date] DESC, id DESC
|
||||
`;
|
||||
|
||||
export const LIST_BY_ARTICLE_ID_LIMITED = `
|
||||
SELECT TOP (@limit) id, companyuser_id AS companyuserId, [date], [text]
|
||||
SELECT TOP (@limit) id, companyuser_id AS companyuserId, [date], [text], meta
|
||||
FROM articlehistory
|
||||
WHERE article_id = @articleId
|
||||
ORDER BY [date] DESC, id DESC
|
||||
|
||||
@@ -38,8 +38,8 @@ WHERE sku = @sku
|
||||
`;
|
||||
|
||||
export const INSERT_ARTICLE_HISTORY = `
|
||||
INSERT INTO articlehistory (article_id, companyuser_id, [text])
|
||||
VALUES (@articleId, @companyuserId, @text);
|
||||
INSERT INTO articlehistory (article_id, companyuser_id, [date], [text], meta)
|
||||
VALUES (@articleId, @companyuserId, COALESCE(@date, SYSUTCDATETIME()), @text, @meta);
|
||||
`;
|
||||
|
||||
export const GET_LATEST_ROW = `
|
||||
|
||||
Reference in New Issue
Block a user