Question
SiXworks Limited
GB
Last activity: 29 May 2024 13:18 EDT
Altering Database Column Type
Hi All,
We have a property .DateOfBirth of date type, which is mapped to a db column of TIMESTAMP. Only the date part is required however in the database, Pega is attaching a 00:00:00 GMT timestamp to the value in the db column.
The issue we have is during BST. "07/05/2024" is being saved as "06/05/2024T23:00:00 GMT" since pega will convert to GMT and subtract a hour for the timezone difference. When we query the value using a Data Page or Report definiton it will return the incorrect date (i.e the day before the actual date of birth). We want to alter the db column type from TIMESTAMP to either DATE to VARCHAR (*). Which can be done using simple sql query. However we have approx 300k records already in the db table which will have the timestamp attached. Has anyone done anything like this and can suggest how we can tackle is problem? We are a little bit concerned how pega will handle the data conversion if we do, do the alter column datatype.
We are able to write data fix activites to correct the data after. Or we even considered to drop the current TIMESTAMP column, add a new VARCHAR column and use optimisation job to re populate the new column with the value from the blob. Any suggestions are welcome.
Kind Regards,
Anthony