diff --git a/master/static/migrations/20231006105547_update-modified-at-for-certain-columns-on-users-table.tx.down.sql b/master/static/migrations/20231006105547_update-modified-at-for-certain-columns-on-users-table.tx.down.sql new file mode 100644 index 00000000000..e69de29bb2d diff --git a/master/static/migrations/20231006105547_update-modified-at-for-certain-columns-on-users-table.tx.up.sql b/master/static/migrations/20231006105547_update-modified-at-for-certain-columns-on-users-table.tx.up.sql new file mode 100644 index 00000000000..5e7095ed4f8 --- /dev/null +++ b/master/static/migrations/20231006105547_update-modified-at-for-certain-columns-on-users-table.tx.up.sql @@ -0,0 +1,6 @@ +DROP TRIGGER IF EXISTS autoupdate_users_modified_at ON users; + +CREATE TRIGGER autoupdate_users_modified_at + BEFORE INSERT OR UPDATE OF password_hash, admin, active, display_name, remote ON public.users + FOR EACH ROW + EXECUTE PROCEDURE public.set_modified_time();