diff options
Diffstat (limited to 'apps/web/src')
4 files changed, 15 insertions, 1 deletions
diff --git a/apps/web/src/services/storage/migrations/index.ts b/apps/web/src/services/storage/migrations/index.ts index 2343362f..158db957 100644 --- a/apps/web/src/services/storage/migrations/index.ts +++ b/apps/web/src/services/storage/migrations/index.ts @@ -1,9 +1,9 @@ export { StorageMigration } from "./base"; export { StorageVersionManager } from "./version-manager"; -export { runStorageMigrations } from "./runner"; import { V0toV1Migration } from "./v0-to-v1"; import { V1toV2Migration } from "./v1-to-v2"; import { V2toV3Migration } from "./v2-to-v3"; +export { runStorageMigrations } from "./runner"; export const CURRENT_STORAGE_VERSION = 3; diff --git a/apps/web/src/services/storage/migrations/v0-to-v1.ts b/apps/web/src/services/storage/migrations/v0-to-v1.ts index 18e15180..e183ddf2 100644 --- a/apps/web/src/services/storage/migrations/v0-to-v1.ts +++ b/apps/web/src/services/storage/migrations/v0-to-v1.ts @@ -1,3 +1,9 @@ +/* + * Ensures every project has at least one scene + * Adds a default "Main scene" if none exist + * Sets currentSceneId to the new scene's id + */ + import { IndexedDBAdapter } from "@/services/storage/indexeddb-adapter"; import { StorageMigration } from "./base"; import { getProjectId, transformProjectV0ToV1 } from "./transformers/v0-to-v1"; diff --git a/apps/web/src/services/storage/migrations/v1-to-v2.ts b/apps/web/src/services/storage/migrations/v1-to-v2.ts index 7519c6ac..a4e1f20b 100644 --- a/apps/web/src/services/storage/migrations/v1-to-v2.ts +++ b/apps/web/src/services/storage/migrations/v1-to-v2.ts @@ -1,3 +1,7 @@ +/* + * Adds default values for new project properties introduced in v2 + */ + import { IndexedDBAdapter } from "@/services/storage/indexeddb-adapter"; import { StorageMigration } from "./base"; import { getProjectId, transformProjectV1ToV2 } from "./transformers/v1-to-v2"; diff --git a/apps/web/src/services/storage/migrations/v2-to-v3.ts b/apps/web/src/services/storage/migrations/v2-to-v3.ts index 100dc572..7c52f79d 100644 --- a/apps/web/src/services/storage/migrations/v2-to-v3.ts +++ b/apps/web/src/services/storage/migrations/v2-to-v3.ts @@ -1,3 +1,7 @@ +/* + * Adds a "duration" field to each project's metadata + */ + import { IndexedDBAdapter } from "@/services/storage/indexeddb-adapter"; import { StorageMigration } from "./base"; import { getProjectId, transformProjectV2ToV3 } from "./transformers/v2-to-v3"; |
