From eb4aefde24fda9193b982cd533c45202b0e4ea0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Avila?= Date: Sun, 20 Aug 2023 12:52:21 -0500 Subject: [PATCH] Refines trigger logic for updates on size and status changes --- database/migrations/20230820013540_update_folder_size.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/database/migrations/20230820013540_update_folder_size.sql b/database/migrations/20230820013540_update_folder_size.sql index 7b859dc..680d989 100644 --- a/database/migrations/20230820013540_update_folder_size.sql +++ b/database/migrations/20230820013540_update_folder_size.sql @@ -44,7 +44,7 @@ $$ LANGUAGE plpgsql; -- +goose StatementBegin CREATE TRIGGER update_folder_size_after_insert_update_delete -AFTER INSERT OR UPDATE OR DELETE ON teldrive.files +AFTER INSERT OR UPDATE OF size, status OR DELETE ON teldrive.files FOR EACH ROW EXECUTE PROCEDURE teldrive.update_size_function(); -- +goose StatementEnd