u
This commit is contained in:
@@ -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(() => {
|
||||||
|
|||||||
@@ -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
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user