Initial commit: AI platform app (server, views, lib, data, deploy docs)
Made-with: Cursor
This commit is contained in:
32
scripts/check-ax-schema.js
Normal file
32
scripts/check-ax-schema.js
Normal file
@@ -0,0 +1,32 @@
|
||||
#!/usr/bin/env node
|
||||
/**
|
||||
* ax_assignments 테이블 컬럼 타입 확인 (PostgreSQL)
|
||||
* 사용: node scripts/check-ax-schema.js
|
||||
*/
|
||||
require("dotenv").config({ path: require("path").join(__dirname, "..", ".env") });
|
||||
const { Pool } = require("pg");
|
||||
|
||||
const pool = new Pool({
|
||||
host: process.env.DB_HOST || "localhost",
|
||||
port: Number(process.env.DB_PORT || 5432),
|
||||
database: process.env.DB_DATABASE || "ai_web_platform",
|
||||
user: process.env.DB_USERNAME,
|
||||
password: process.env.DB_PASSWORD,
|
||||
});
|
||||
|
||||
async function main() {
|
||||
const res = await pool.query(`
|
||||
SELECT column_name, data_type, udt_name
|
||||
FROM information_schema.columns
|
||||
WHERE table_name = 'ax_assignments'
|
||||
ORDER BY ordinal_position
|
||||
`);
|
||||
console.log("ax_assignments columns:");
|
||||
res.rows.forEach((r) => console.log(` ${r.column_name}: ${r.data_type} (${r.udt_name})`));
|
||||
await pool.end();
|
||||
}
|
||||
|
||||
main().catch((e) => {
|
||||
console.error(e);
|
||||
process.exit(1);
|
||||
});
|
||||
Reference in New Issue
Block a user