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();