From 32c66d6dcf72836017abe89cd0468bcb6038c564 Mon Sep 17 00:00:00 2001 From: William Date: Thu, 21 Sep 2023 07:33:54 +0200 Subject: [PATCH] Fix sql bug Signed-off-by: William --- db/migrations/000002_add_twofactor_options.up.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/db/migrations/000002_add_twofactor_options.up.sql b/db/migrations/000002_add_twofactor_options.up.sql index 32f6793..a389c8a 100644 --- a/db/migrations/000002_add_twofactor_options.up.sql +++ b/db/migrations/000002_add_twofactor_options.up.sql @@ -14,7 +14,7 @@ ALTER TABLE users ADD COLUMN totp_url VARCHAR ; UPDATE users SET totp_url = ''; ALTER TABLE users ADD COLUMN totp_created TIMESTAMP ; -- Update previous records send type to email since there was no other option except email -ALTER TABLE two_factor_requests ADD COLUMN send_type enum_send_type NOT NULL; +ALTER TABLE two_factor_requests ADD COLUMN send_type enum_send_type ; UPDATE two_factor_requests SET send_type = 'EMAIL'; - +ALTER TABLE two_factor_requests ALTER COLUMN send_type SET NOT NULL; COMMIT; \ No newline at end of file