Version 3 #67

Merged
danieljsummers merged 53 commits from version-3 into master 2021-10-26 23:39:59 +00:00
Showing only changes of commit f1a502c7b9 - Show all commits

View File

@ -1,31 +0,0 @@
ALTER TABLE mpj.request
ADD COLUMN "showAfter" BIGINT NOT NULL DEFAULT 0;
ALTER TABLE mpj.request
ADD COLUMN "recurType" VARCHAR(10) NOT NULL DEFAULT 'immediate';
ALTER TABLE mpj.request
ADD COLUMN "recurCount" SMALLINT NOT NULL DEFAULT 0;
CREATE OR REPLACE VIEW mpj.journal AS
SELECT
request."requestId",
request."userId",
(SELECT "text"
FROM mpj.history
WHERE history."requestId" = request."requestId"
AND "text" IS NOT NULL
ORDER BY "asOf" DESC
LIMIT 1) AS "text",
(SELECT "asOf"
FROM mpj.history
WHERE history."requestId" = request."requestId"
ORDER BY "asOf" DESC
LIMIT 1) AS "asOf",
(SELECT "status"
FROM mpj.history
WHERE history."requestId" = request."requestId"
ORDER BY "asOf" DESC
LIMIT 1) AS "lastStatus",
request."snoozedUntil",
request."showAfter",
request."recurType",
request."recurCount"
FROM mpj.request;