Skip to content

Commit

Permalink
Update mtw_schema.sql
Browse files Browse the repository at this point in the history
  • Loading branch information
filak committed Sep 27, 2023
1 parent 32aed4f commit dbf9349
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion flask-app/instance/db/mtw_schema.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-- version 0.2.2
-- version 0.2.3
-- run: sqlite3 mtw.db < mtw_schema.sql

/* users */
Expand All @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit dbf9349

Please sign in to comment.