- 통합 원격 접속 정보 UI 구현 (IP/MAC 및 계정 정보 통합) - 서버 측 스냅샷 비교 기반 자동 이력(Log) 생성 로직 도입 - 타임라인 UI 개선 (이벤트별 색상 뱃지 및 변동 사항 강조) - 자산 상세 필드 확장 (서비스 구분, 용도 등) - 테스트 데이터 생성기 및 이력 계획서 추가
37 lines
958 B
JavaScript
37 lines
958 B
JavaScript
import mysql from 'mysql2/promise';
|
|
import dotenv from 'dotenv';
|
|
|
|
dotenv.config();
|
|
|
|
const { DB_HOST, DB_USER, DB_PASS, DB_NAME, DB_PORT } = process.env;
|
|
|
|
async function probeDB() {
|
|
const connection = await mysql.createConnection({
|
|
host: DB_HOST,
|
|
user: DB_USER,
|
|
password: DB_PASS,
|
|
database: DB_NAME,
|
|
port: parseInt(DB_PORT || '3306')
|
|
});
|
|
|
|
console.log('--- Database Probe Start ---');
|
|
|
|
const [tables] = await connection.query('SHOW TABLES');
|
|
const tableNames = tables.map(t => Object.values(t)[0]);
|
|
|
|
console.log('Existing Tables:', tableNames);
|
|
|
|
for (const table of tableNames) {
|
|
const [columns] = await connection.query(`DESCRIBE ${table}`);
|
|
console.log(`\n[Table: ${table}]`);
|
|
columns.forEach(c => {
|
|
console.log(` - ${c.Field} (${c.Type}) ${c.Comment ? '// ' + c.Comment : ''}`);
|
|
});
|
|
}
|
|
|
|
await connection.end();
|
|
console.log('\n--- Database Probe End ---');
|
|
}
|
|
|
|
probeDB().catch(console.error);
|