SVDYZSZCLZX77OM4W4XK5ODTVZQ6VTRTMHXOFXO65WZNFZPQAG2AC
NZXX6PLDWEDQHXFF5JCZWGB22VA3WSDYLX65K6BQ5GNWPOE43N7QC
JM3DPYOMVNMCL5GMEYC3Y4NDRGTNIFBBFTPGPVT66GPENVPU7EVQC
5SHCWE7XPQORSOLY7HGAIK2ODKBFPY4KVXRL2W7X6D4WALU544HQC
SB2V735VJ2CDHGCXRUA5FOYHDRXQFVOZ3KXC3YKXWRNW6DIX7RXQC
RFE6T5LGBFFNEPHZOPF4UNMFC2L4CGD5TPAMOXDLRPH3TZJ43UBAC
KPZNJ33UUF6TK5OPB6K5KLM3ZEK7YV3IF32HTLJFURCO6ICDMGYAC
3PNG7NIBQQURUUPRVQXYL342OT7JUUYOMY2JJNP6YDX7SYJDZMYAC
N22GPKYTOLZLBGTGDATQDVZ4R5APZEAOIA7L32X4UXBH4XNI7MWAC
D5QIOJGPKQJIYBUCSC3MFJ3TXLPNZ2XMI37GXMFRVRFWWR2VMTFAC
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-05-27 17:40:41
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:M61ikfnjORU7jDAH8P/j7w
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-01-21 11:13:38
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:zDBtAFc4HiFUcL/TpkuCcg
ALTER TABLE JobsetEvals
ADD COLUMN errorMsg text,
ADD COLUMN errorTime integer NULL;
-- Copy the current error in jobsets to the latest field in jobsetevals
UPDATE jobsetevals
SET errorMsg = j.errorMsg,
errorTime = j.errorTime
FROM (
SELECT
jobsets.errorMsg,
jobsets.errorTime,
jobsets.id AS jobset_id,
latesteval.id AS eval_id
FROM jobsets
LEFT JOIN
(
SELECT
MAX(id) AS id,
project,
jobset
FROM jobsetevals
GROUP BY project, jobset
ORDER BY project, jobset
)
AS latesteval
ON
jobsets.name = latesteval.jobset
AND jobsets.project = latesteval.project
WHERE latesteval.id IS NOT NULL
ORDER BY jobsets.id
)
AS j
WHERE id = j.eval_id;