mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-06-07 09:55:43 -04:00
refactor(database): run knex migrations on startup
Co-authored-by: Philip Molares <philip.molares@udo.edu> Signed-off-by: Philip Molares <philip.molares@udo.edu> Signed-off-by: Erik Michelson <github@erik.michelson.eu>
This commit is contained in:
parent
d67e44f540
commit
21a1f35281
85 changed files with 830 additions and 418 deletions
|
@ -9,9 +9,9 @@ import {
|
|||
YDocSyncServerAdapter,
|
||||
} from '@hedgedoc/commons';
|
||||
import * as HedgeDocCommonsModule from '@hedgedoc/commons';
|
||||
import { FieldNameUser, User } from '@hedgedoc/database';
|
||||
import { Mock } from 'ts-mockery';
|
||||
|
||||
import { FieldNameUser, User } from '../../database/types';
|
||||
import * as NameRandomizerModule from './random-word-lists/name-randomizer';
|
||||
import { RealtimeConnection } from './realtime-connection';
|
||||
import { RealtimeNote } from './realtime-note';
|
||||
|
|
|
@ -3,13 +3,13 @@
|
|||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
import { FieldNameRevision } from '@hedgedoc/database';
|
||||
import { Optional } from '@mrdrogdrog/optional';
|
||||
import { BeforeApplicationShutdown, Inject, Injectable } from '@nestjs/common';
|
||||
import { OnEvent } from '@nestjs/event-emitter';
|
||||
import { SchedulerRegistry } from '@nestjs/schedule';
|
||||
|
||||
import appConfiguration, { AppConfig } from '../../config/app.config';
|
||||
import { FieldNameRevision } from '../../database/types';
|
||||
import { NoteEvent } from '../../events';
|
||||
import { ConsoleLoggerService } from '../../logger/console-logger.service';
|
||||
import { NotePermissionLevel } from '../../permissions/note-permission.enum';
|
||||
|
@ -47,6 +47,7 @@ export class RealtimeNoteService implements BeforeApplicationShutdown {
|
|||
.createRevision(
|
||||
realtimeNote.getNoteId(),
|
||||
realtimeNote.getRealtimeDoc().getCurrentContent(),
|
||||
false,
|
||||
undefined,
|
||||
realtimeNote.getRealtimeDoc().encodeStateAsUpdate(),
|
||||
)
|
||||
|
|
|
@ -7,9 +7,9 @@ import {
|
|||
MockedBackendTransportAdapter,
|
||||
YDocSyncServerAdapter,
|
||||
} from '@hedgedoc/commons';
|
||||
import { FieldNameUser, User } from '@hedgedoc/database';
|
||||
import { Mock } from 'ts-mockery';
|
||||
|
||||
import { FieldNameUser, User } from '../../../database/types';
|
||||
import { RealtimeConnection } from '../realtime-connection';
|
||||
import { RealtimeNote } from '../realtime-note';
|
||||
import { RealtimeUserStatusAdapter } from '../realtime-user-status-adapter';
|
||||
|
|
|
@ -4,11 +4,11 @@
|
|||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
import { DisconnectReason, MessageTransporter } from '@hedgedoc/commons';
|
||||
import { FieldNameUser } from '@hedgedoc/database';
|
||||
import { OnGatewayConnection, WebSocketGateway } from '@nestjs/websockets';
|
||||
import { IncomingMessage } from 'http';
|
||||
import WebSocket from 'ws';
|
||||
|
||||
import { FieldNameUser } from '../../database/types';
|
||||
import { ConsoleLoggerService } from '../../logger/console-logger.service';
|
||||
import { NoteService } from '../../notes/note.service';
|
||||
import { NotePermissionLevel } from '../../permissions/note-permission.enum';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue