Güvenlik Doğrulaması,Login Logları

This commit is contained in:
2025-12-29 23:51:25 +03:00
parent 7d55ec93ae
commit 8ba8d2e05e
24 changed files with 1861 additions and 166 deletions

View File

@@ -0,0 +1,12 @@
-- Enable pgcrypto extension for hashing
CREATE EXTENSION IF NOT EXISTS "pgcrypto";
-- Add master_code_hash column to profiles
ALTER TABLE public.profiles ADD COLUMN IF NOT EXISTS master_code_hash TEXT;
-- Set a default master code for Kenan Karaer (or all admins)
-- The hash below is for '123456' using bcrypt
-- You can generate new hashes using: select crypt('YOUR_CODE', gen_salt('bf'));
UPDATE public.profiles
SET master_code_hash = crypt('271210220792', gen_salt('bf'))
WHERE role = 'admin';