This commit is contained in:
seb
2026-10-29 03:39:12 +01:00
parent 72e6e79d20
commit 005b48ff66
2 changed files with 8 additions and 1 deletions

View File

@@ -5,6 +5,7 @@ import { clearCachedCompanyUsers, clearCachedUser } from '../api/middleware/auth
import { clearDeletedCompany, setUserCompany } from '../api/sse.js'; import { clearDeletedCompany, setUserCompany } from '../api/sse.js';
const storeLog = createLogger('libstore'); const storeLog = createLogger('libstore');
const schemaLog = createLogger('schema');
let provider; let provider;
let store; let store;
@@ -146,7 +147,12 @@ export async function getStore() {
if (!connecting) { if (!connecting) {
connecting = (async () => { connecting = (async () => {
provider = createProvider(); provider = createProvider();
await provider.initialize(); try {
await provider.initialize((msg) => schemaLog.info(msg));
} catch (err) {
schemaLog.error('Database schema initialization failed:', err);
throw err;
}
store = wrapStoreWithTiming(await new LibDashStore(provider)); store = wrapStoreWithTiming(await new LibDashStore(provider));
return store; return store;
})().finally(() => { })().finally(() => {

View File

@@ -67,6 +67,7 @@ const DIVISION_COLORS = {
vfs: chalk.hex('#14b8a6'), // Teal vfs: chalk.hex('#14b8a6'), // Teal
event: chalk.hex('#a855f7'), // Violet event: chalk.hex('#a855f7'), // Violet
backup: chalk.hex('#06b6d4'), // Cyan backup: chalk.hex('#06b6d4'), // Cyan
schema: chalk.hex('#0ea5e9'), // Sky blue
}; };
/** /**