From dbf93490cc5c9effd913bbd159d4657a82102b6e Mon Sep 17 00:00:00 2001 From: filak Date: Wed, 27 Sep 2023 17:48:42 +0200 Subject: [PATCH] Update mtw_schema.sql --- flask-app/instance/db/mtw_schema.sql | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/flask-app/instance/db/mtw_schema.sql b/flask-app/instance/db/mtw_schema.sql index 6dbd405..3655cc9 100644 --- a/flask-app/instance/db/mtw_schema.sql +++ b/flask-app/instance/db/mtw_schema.sql @@ -1,4 +1,4 @@ --- version 0.2.2 +-- version 0.2.3 -- run: sqlite3 mtw.db < mtw_schema.sql /* users */ @@ -18,6 +18,7 @@ create table users ( params text ); +DROP TRIGGER users_upd_trig; CREATE TRIGGER users_upd_trig AFTER UPDATE ON users BEGIN update users SET updated = strftime('%Y-%m-%dT%H:%M:%S','now', 'localtime') WHERE id = NEW.id; @@ -49,6 +50,7 @@ create table audit ( params text -- null or input-data or original-data ); +DROP TRIGGER audit_upd_trig; CREATE TRIGGER audit_upd_trig AFTER UPDATE ON audit BEGIN update audit SET updated = strftime('%Y-%m-%dT%H:%M:%S','now', 'localtime') WHERE id = NEW.id;