feat: make db migration on-demand instead of automatic

This commit is contained in:
thecodrr
2022-07-20 07:34:12 +05:00
parent 83b2d79e01
commit e06cf139f0
3 changed files with 12 additions and 16 deletions

View File

@@ -26,6 +26,7 @@ import NoteHistory from "../collections/note-history";
import MFAManager from "./mfa-manager";
import EventManager from "../utils/event-manager";
import Pricing from "./pricing";
import { logger } from "../logger";
/**
* @type {EventSource}
@@ -125,9 +126,11 @@ class Database {
await this.settings.init();
await this.outbox.init();
await this.user.init();
await this.migrations.init();
await this.migrations.migrate();
if (this.migrations.required()) {
logger.warn("Database migration is required.");
}
}
disconnectSSE() {