hyperswitch
hyperswitch copied to clipboard
[BUG] Remove default values for created_at and modified_at from the database
Context
Currently we are setting created_at
and modified_at
in the database during insert through Posgresql now()
function which gives the current time according to the current time zone. But when we modify the data we pass common_utils::date_time::now
to update modified at which gives the date time in UTC.
Resolution
Remove default values for created_at
and modified_at
from database and add it in DatabaseStructNew
struct. Which forces the developer to pass these values while inserting, which fixes inconsistencies of these two values between database and application