lp1846354 set existing user messages to public
authorJason Etheridge <jason@EquinoxInitiative.org>
Fri, 24 Apr 2020 20:33:49 +0000 (16:33 -0400)
committerMike Rylander <mrylander@gmail.com>
Tue, 8 Sep 2020 19:21:15 +0000 (15:21 -0400)
before adding new ones; also, remove a lingering reference to alert_message in
Storage/CDBI/actor.pm

Signed-off-by: Jason Etheridge <jason@EquinoxInitiative.org>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/CDBI/actor.pm
Open-ILS/src/sql/Pg/upgrade/XXXX.schema.note_and_message_consolidation

index a4047f7..4db37c2 100644 (file)
@@ -17,7 +17,7 @@ __PACKAGE__->columns( Essential => qw/usrname email first_given_name
                 ident_type2 ident_value2 net_access_level alias
                 photo_url create_date expire_date credit_forward_balance
                 super_user usrgroup passwd card last_xact_id
-                standing barred profile prefix suffix alert_message
+                standing barred profile prefix suffix
                 day_phone evening_phone other_phone mailing_address
                 claims_never_checked_out_count last_update_time/ );
 
index f798d50..728147b 100644 (file)
@@ -13,6 +13,10 @@ AS SELECT * FROM actor.usr_message WHERE pub AND NOT deleted;
 
 ALTER TABLE actor.usr_standing_penalty ADD COLUMN usr_message BIGINT REFERENCES actor.usr_message(id);
 
+-- alright, let's set all existing user messages to public
+
+UPDATE actor.usr_message SET pub = TRUE;
+
 -- alright, let's migrate penalty notes to usr_messages and link the messages back to the penalties:
 
 CREATE TEMP TABLE XXXX_penalty_notes AS