Feat: save cash balance notifications in DB

Feat: add "detail" row in notifications table migration

This makes searching for specific notifications in the
code like cashbox number easier because we don't need
to scrub the notification message column anymore to search
for notifications relating the cashbox 1 for example.

Feat: clear notifications on cash cassette balance update
This commit is contained in:
Cesar 2020-12-10 11:49:01 +00:00 committed by Josh Harvey
parent 2ced230020
commit 196a05549f
5 changed files with 64 additions and 6 deletions

View file

@ -21,6 +21,7 @@ exports.up = function (next) {
CREATE TABLE IF NOT EXISTS "notifications" (
"id" uuid NOT NULL PRIMARY KEY,
"type" notification_type NOT NULL,
"detail" TEXT,
"device_id" TEXT NOT NULL,
"message" TEXT NOT NULL,
"created" time with time zone NOT NULL,