fix: add DB migration to add workspace (#3115)

This commit is contained in:
Peng Xiao
2023-07-10 16:03:18 +08:00
committed by GitHub
parent 812e0e9c9a
commit dac4e390aa
14 changed files with 213 additions and 28 deletions

View File

@@ -7,7 +7,7 @@ export interface WatchOptions {
recursive?: boolean;
}
/** Watcher kind enumeration */
export const enum WatcherKind {
export enum WatcherKind {
/** inotify backend (linux) */
Inotify = 'Inotify',
/** FS-Event backend (mac) */
@@ -38,6 +38,12 @@ export interface InsertRow {
docId?: string;
data: Uint8Array;
}
export enum ValidationResult {
MissingTables = 0,
MissingDocIdColumn = 1,
GeneralError = 2,
Valid = 3,
}
export class Subscription {
toString(): string;
unsubscribe(): void;
@@ -71,5 +77,6 @@ export class SqliteConnection {
): Promise<void>;
close(): Promise<void>;
get isClose(): boolean;
static validate(path: string): Promise<boolean>;
static validate(path: string): Promise<ValidationResult>;
migrateAddDocId(): Promise<void>;
}