From 43b7b32d430714d59c51298b765e37f0715230aa Mon Sep 17 00:00:00 2001 From: Chris Sharp Date: Thu, 2 Jul 2015 13:58:40 -0400 Subject: [PATCH] adding expiration date parameter --- sql/set_patrons_inactive.sql | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sql/set_patrons_inactive.sql b/sql/set_patrons_inactive.sql index 7c87653..a506947 100644 --- a/sql/set_patrons_inactive.sql +++ b/sql/set_patrons_inactive.sql @@ -44,6 +44,8 @@ and not exists ( and au.active -- we don't care about deleted users and not au.deleted +-- don't include non-expired users that don't otherwise meet the "inactive" criteria +and expire_date < now() -- we don't want users that have been created within the last 3 years and (now() - au.create_date) > '3 years' -- restrict to patron profiles ('Patrons' = 45) @@ -53,3 +55,4 @@ and profile in ( ) ; commit; + -- 2.11.0