37 lines
1.0 KiB
JavaScript
37 lines
1.0 KiB
JavaScript
const { Client } = require("pg");
|
|
require("dotenv/config");
|
|
|
|
async function checkPasswordField() {
|
|
const client = new Client({
|
|
connectionString: process.env.DATABASE_URL,
|
|
});
|
|
|
|
try {
|
|
await client.connect();
|
|
console.log("✅ 데이터베이스 연결 성공");
|
|
|
|
// user_info 테이블의 컬럼 정보 확인
|
|
const columnsResult = await client.query(`
|
|
SELECT column_name, data_type, is_nullable
|
|
FROM information_schema.columns
|
|
WHERE table_name = 'user_info'
|
|
ORDER BY ordinal_position
|
|
`);
|
|
console.log("📋 user_info 테이블 컬럼:", columnsResult.rows);
|
|
|
|
// 비밀번호 관련 컬럼 확인
|
|
const passwordResult = await client.query(`
|
|
SELECT user_id, user_name, user_password, password, status
|
|
FROM user_info
|
|
WHERE user_id = 'kkh'
|
|
`);
|
|
console.log("🔐 사용자 비밀번호 정보:", passwordResult.rows);
|
|
} catch (error) {
|
|
console.error("❌ 오류 발생:", error);
|
|
} finally {
|
|
await client.end();
|
|
}
|
|
}
|
|
|
|
checkPasswordField();
|