Project

General

Profile

Bug #7220

Erroneous values in mentat_main/reports_events/mail_to

Added by Radko Krkoš 2 months ago. Updated about 2 months ago.

Status:
New
Priority:
Low
Assignee:
-
Category:
Development - Database
Target version:
Start date:
04/16/2021
Due date:
% Done:

0%

Estimated time:
To be discussed:
No

Description

As was discussed in VC, the mail_to column of table reports_events in the database mentat_main contains strange or straight erroneous values. Some of these arrays are empty, some e-mails have prepended spaces and there is at least one "None" which seems to be an alternative realisation of `empty`.
From discussion: It might be the case that the mail_to column is not really accessed after store and could be removed entirely.


Related issues

Related to Mentat - Feature #7221: Referential integrity for database arraysNewRadko Krkoš04/16/2021

Actions
Related to Mentat - Feature #7257: Store email addresses to which the report was sentNewRajmund Hruska04/29/2021

Actions
#1

Updated by Radko Krkoš 2 months ago

  • Related to Feature #7221: Referential integrity for database arrays added
#2

Updated by Pavel Kácha about 2 months ago

  • Related to Feature #7257: Store email addresses to which the report was sent added
#3

Updated by Radko Krkoš about 2 months ago

Based on discussion, the empty array case can be detected and enforced in the DB as follows:

ALTER TABLE reports_events ADD CONSTRAINT mail_to_non_empty_array CHECK (mail_to <> '{}');

Also available in: Atom PDF