﻿SET NOCOUNT ON;

-- Reset password hash for superadmin@powdercoating.com / SuperAdmin123!
UPDATE AspNetUsers
SET
    PasswordHash   = 'AQAAAAEAAYagAAAAEOl+bhp4wG2EHbbmOqWK7xV09ve7JBpy85sH4ZPufbO36VoVDm/TwvphXES6t+DteQ==',
    SecurityStamp  = '3a23c797-6ae3-4d36-9bd0-5977bb51411a'
WHERE NormalizedEmail = 'SUPERADMIN@POWDERCOATING.COM';

PRINT 'Updated: superadmin@powdercoating.com';

-- Reset password hash for admin@powdercoating.com / Admin123!
UPDATE AspNetUsers
SET
    PasswordHash   = 'AQAAAAEAAYagAAAAEDRofgA5DOrEQ6MI/4qiifCcdqnWXBtrWhsqWDucXsB2QIvTrGaAAXQDXuZsQgnj3g==',
    SecurityStamp  = '27fa18d3-dd94-46fc-bfe5-bb00950d531b'
WHERE NormalizedEmail = 'ADMIN@POWDERCOATING.COM';

PRINT 'Updated: admin@powdercoating.com';

-- Verify both users exist and have non-null hashes
SELECT Email, LEN(PasswordHash) AS HashLength, IsActive
FROM AspNetUsers
WHERE NormalizedEmail IN ('SUPERADMIN@POWDERCOATING.COM', 'ADMIN@POWDERCOATING.COM');
