mass refactor
This commit is contained in:
14
check_schema.ts
Normal file
14
check_schema.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import { query } from './src/database/connection';
|
||||
|
||||
async function checkSchema() {
|
||||
try {
|
||||
const result = await query('SELECT column_name, data_type FROM information_schema.columns WHERE table_name = $1', ['messages']);
|
||||
console.log(result.rows);
|
||||
process.exit(0);
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
checkSchema();
|
||||
Reference in New Issue
Block a user