From 3f3b202d47c4983b5379a4a655c0f26cb7728c59 Mon Sep 17 00:00:00 2001 From: Vladimir Zagainov Date: Sun, 4 Jan 2026 14:38:26 +0300 Subject: [PATCH] feat: add modpack update tracking feature --- backend | 2 +- scripts/migrations/002_modpacks_updated_at.sql | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 scripts/migrations/002_modpacks_updated_at.sql diff --git a/backend b/backend index e98d10a..275c1f2 160000 --- a/backend +++ b/backend @@ -1 +1 @@ -Subproject commit e98d10ae1d8d960567abcf36cd7369f352af1130 +Subproject commit 275c1f2d50e2292f72b74f6fd3b35eda0ef370f9 diff --git a/scripts/migrations/002_modpacks_updated_at.sql b/scripts/migrations/002_modpacks_updated_at.sql new file mode 100644 index 0000000..3604816 --- /dev/null +++ b/scripts/migrations/002_modpacks_updated_at.sql @@ -0,0 +1,6 @@ +ALTER TABLE modpacks ADD COLUMN updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW(); + +CREATE TRIGGER set_timestamp_modpacks +BEFORE UPDATE ON modpacks +FOR EACH ROW +EXECUTE FUNCTION trigger_set_timestamp();