Skip to content

Commit

Permalink
Update dbQuery.sql
Browse files Browse the repository at this point in the history
  • Loading branch information
Harshdev098 authored Jan 12, 2025
1 parent bc3cbac commit 974346d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions config/dbQuery.sql
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ CREATE TABLE user_table (
username VARCHAR(60) NOT NULL,
email VARCHAR(80) NOT NULL UNIQUE,
password VARCHAR(140) NOT NULL UNIQUE,
otp VARCHAR(6) DEFAULT NULL
otp VARCHAR(6) DEFAULT NULL,
otp_created_at DATETIME
);

-- Create the info_table
Expand Down Expand Up @@ -82,7 +83,7 @@ do
begin
DELETE FROM user_table
WHERE otp IS NOT NULL
AND TIMESTAMPDIFF(MINUTE, otp_generated_time, NOW()) >= 2;
AND TIMESTAMPDIFF(MINUTE, otp_created_at, NOW()) >= 2;
END //
DELIMITER ;
set global event_scheduler=on;

0 comments on commit 974346d

Please sign in to comment.