from app.core.database.db_session import engine_core from sqlalchemy import text from app.utils.Hash_util import hash_password def check(): pwd_hash = hash_password('Admin$2026Setup') with engine_core.connect() as conn: conn.execute(text("UPDATE users SET password_hash = :pwd, is_locked = 0, is_active = 1, failed_login_attempts = 0 WHERE email='admin@ifixkart.com'"), {'pwd': pwd_hash}) conn.commit() res = conn.execute(text("SELECT user_id, email, is_locked, is_active FROM users WHERE email='admin@ifixkart.com'")).fetchone() print('User:', res) if __name__ == '__main__': check()