mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-18 10:36:22 +08:00
feat: support migration (#2852)
This commit is contained in:
@@ -1,13 +1,27 @@
|
||||
import type { WorkspaceFlavour } from '@affine/env/workspace';
|
||||
import type { WorkspaceVersion } from '@affine/env/workspace';
|
||||
import type { EditorContainer } from '@blocksuite/editor';
|
||||
import { atom } from 'jotai';
|
||||
import { atomWithStorage } from 'jotai/utils';
|
||||
import Router from 'next/router';
|
||||
|
||||
export type RootWorkspaceMetadata = {
|
||||
export type RootWorkspaceMetadataV2 = {
|
||||
id: string;
|
||||
flavour: WorkspaceFlavour;
|
||||
version: WorkspaceVersion;
|
||||
};
|
||||
|
||||
export type RootWorkspaceMetadataV1 = {
|
||||
id: string;
|
||||
flavour: WorkspaceFlavour;
|
||||
// force type check
|
||||
version: undefined;
|
||||
};
|
||||
|
||||
export type RootWorkspaceMetadata =
|
||||
| RootWorkspaceMetadataV1
|
||||
| RootWorkspaceMetadataV2;
|
||||
|
||||
// #region root atoms
|
||||
// root primitive atom that stores the necessary data for the whole app
|
||||
// be careful when you use this atom,
|
||||
|
||||
Reference in New Issue
Block a user