--Reset_SideList_Born_Died_Widths-RM8.sql
/* 2023-02-14 Tom Holden ve3meo
rev2023-02-15 now resets to default width regardless of stored widths. 
              1st ver only operated on width=0. Now REQUIRES a sqlite
              manager that supports the regexp_replace() function.
              Tested with SQLiteSpy 1.9.15 Win32 
              
The RM8.5.0 Side Index columns for Born and Died can be made to disappear
by certain adjustments of widths and cannot be made to reappear using the 
UI. This script resets the parameters stored in the database to the default
for a new database. On reopening in RM, the columns will reappear at the default width. 

Usage: 
Close the database in RM which will save its current setting in the database.
Open the database in the SQLite manager and execute this script against it.
On reopening in RM, the columns will reappear.
*/
UPDATE ConfigTable
SET DataRec = CAST(REGEXP_REPLACE(DataRec,'SideListBirthWidth>([0-9\.]+)<','SideListBirthWidth>40<') AS BLOB)
WHERE RecID=1
;

UPDATE ConfigTable
SET DataRec = CAST(REGEXP_REPLACE(DataRec,'SideListDeathWidth>([0-9\.]+)<','SideListDeathWidth>40<') AS BLOB)
WHERE RecID=1
;
