decomp DBCServer_Release and inspect/document database

This commit is contained in:
Benjamin Palko 2026-10-14 23:22:03 -04:00
parent 4b267cbe05
commit 7834b98bf0
28222 changed files with 843300 additions and 144 deletions

View file

@ -0,0 +1,43 @@
CREATE PROCEDURE [dbo].[ClearVerificationCode]
@Email varchar(255)
AS
BEGIN
SET NOCOUNT ON;
DECLARE @Result varchar(30)
DECLARE @VerificationCodeExists int;
BEGIN TRY
BEGIN TRANSACTION
SELECT @VerificationCodeExists = COUNT(*) FROM VerificationCode
WHERE Email = @Email;
-- Check if VerificationCode exists
IF @VerificationCodeExists > 0
SET @Result = 'VerificationCodeExists';
ELSE
SET @Result = 'NoVerificationCode';
-- DELETE VerificationCodes
IF @Result = 'VerificationCodeExists'
BEGIN
DELETE FROM VerificationCode WHERE Email = @Email;
SET @Result = 'VerificationCodeClean';
END;
COMMIT TRANSACTION;
END TRY
BEGIN CATCH
ROLLBACK TRANSACTION;
SET @Result = 'TransactionFailed';
END CATCH
SELECT @Result as Result;
END