hyperswitch icon indicating copy to clipboard operation
hyperswitch copied to clipboard

[BUG] Remove default values for created_at and modified_at from the database

Open dracarys18 opened this issue 1 year ago • 0 comments

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

dracarys18 avatar Apr 25 '23 13:04 dracarys18