const { Client } = require("pg"); async function updatePassword() { const client = new Client({ connectionString: process.env.DATABASE_URL, }); try { await client.connect(); console.log("✅ 데이터베이스 연결 성공"); // kkh 사용자의 비밀번호를 admin123으로 변경 await client.query(` UPDATE user_info SET user_password = 'f21b1ce8b08dc955bd4afff71b3db1fc' WHERE user_id = 'kkh' `); console.log("✅ 비밀번호 변경 완료: kkh -> admin123"); // 변경 확인 const result = await client.query(` SELECT user_id, user_name, user_password FROM user_info WHERE user_id = 'kkh' `); console.log("👤 변경된 사용자:", result.rows[0]); } catch (error) { console.error("❌ 오류 발생:", error); } finally { await client.end(); } } updatePassword();