github.com/glennzw/gophish@v0.8.1-0.20190824020715-24fe998a3aa0/db/db_sqlite3/migrations/20180524203752_0.7.0_result_last_modified.sql (about) 1 2 -- +goose Up 3 -- SQL in section 'Up' is executed when this migration is applied 4 ALTER TABLE results ADD COLUMN modified_date DATETIME; 5 6 UPDATE results 7 SET `modified_date`= ( 8 SELECT max(events.time) FROM events 9 WHERE events.email=results.email 10 AND events.campaign_id=results.campaign_id 11 ); 12 13 14 15 -- +goose Down 16 -- SQL section 'Down' is executed when this migration is rolled back 17