Initial commit: 宁夏智慧养殖监管平台
This commit is contained in:
19
backend/check-alerts-status.js
Normal file
19
backend/check-alerts-status.js
Normal file
@@ -0,0 +1,19 @@
|
||||
const { sequelize } = require('./config/database-simple');
|
||||
|
||||
async function checkAlertsStatus() {
|
||||
try {
|
||||
await sequelize.authenticate();
|
||||
console.log('数据库连接成功');
|
||||
|
||||
const [results] = await sequelize.query('SHOW COLUMNS FROM alerts LIKE "status"');
|
||||
console.log('Alerts表status字段信息:');
|
||||
console.table(results);
|
||||
|
||||
} catch (error) {
|
||||
console.error('查询失败:', error.message);
|
||||
} finally {
|
||||
await sequelize.close();
|
||||
}
|
||||
}
|
||||
|
||||
checkAlertsStatus();
|
||||
Reference in New Issue
Block a user