添加db_migrate功能
This commit is contained in:
@@ -7,7 +7,7 @@ const prometheusService = require('./prometheus-service');
|
||||
const cache = require('./cache');
|
||||
const geoService = require('./geo-service');
|
||||
const latencyService = require('./latency-service');
|
||||
const checkAndFixDatabase = require('./db-schema-check');
|
||||
const db_migrate = require('./db-schema-check');
|
||||
const http = require('http');
|
||||
const WebSocket = require('ws');
|
||||
const net = require('net');
|
||||
@@ -651,7 +651,7 @@ APP_SECRET=${process.env.APP_SECRET || APP_SECRET}
|
||||
cache.init();
|
||||
|
||||
// Run the migration/centralized schema tool to create/fix all tables
|
||||
await checkAndFixDatabase();
|
||||
await db_migrate();
|
||||
|
||||
isDbInitialized = true;
|
||||
res.json({ success: true, message: 'Initialization complete' });
|
||||
@@ -1509,7 +1509,7 @@ async function start() {
|
||||
|
||||
// 2. Automated repair/migration
|
||||
try {
|
||||
const dbFixed = await checkAndFixDatabase();
|
||||
const dbFixed = await db_migrate();
|
||||
if (dbFixed) {
|
||||
// Refresh state after fix
|
||||
await checkDb();
|
||||
|
||||
Reference in New Issue
Block a user