JBAS-1243 Push user expire_date's to future
authorBill Erickson <berickxx@gmail.com>
Fri, 1 Apr 2016 19:35:56 +0000 (15:35 -0400)
committerBill Erickson <berickxx@gmail.com>
Thu, 21 Mar 2019 19:46:23 +0000 (15:46 -0400)
Fixes issue where transactions (circs/holds) are not created because all
users are expired.

Signed-off-by: Bill Erickson <berickxx@gmail.com>
KCLS/sql/sample-data/exports/kcls-dev-users.sql

index a5aed33..66843e9 100644 (file)
@@ -8000,3 +8000,9 @@ INSERT INTO actor.usr_address (country, within_city_limits, post_code, street1,
 INSERT INTO actor.card (barcode, usr) VALUES ('310044', CURRVAL('actor.usr_id_seq'));
 UPDATE actor.usr SET card = CURRVAL('actor.card_id_seq'), billing_address = CURRVAL('actor.usr_address_id_seq'), credit_forward_balance = '0', mailing_address = CURRVAL('actor.usr_address_id_seq') WHERE id=CURRVAL('actor.usr_id_seq');
 
+-- Expire dates above are all hard-coded in the past.  Push most of them
+-- out to the future.  Leave a few for testing.
+UPDATE actor.usr 
+    SET expire_date = NOW() + '3 years'::INTERVAL 
+    WHERE DATE(create_date) = CURRENT_DATE AND id > 10;
+