[PR #1699] [MERGED] Feat/restore from snapshot #4900

Closed
opened 2026-03-23 22:16:19 +00:00 by mirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/AppFlowy-IO/AppFlowy/pull/1699
Author: @appflowy
Created: 1/12/2023
Status: Merged
Merged: 1/12/2023
Merged by: @appflowy

Base: mainHead: feat/restore_from_snapshot


📝 Commits (2)

  • 2574a55 feat: snapshot for folder
  • a045925 feat: snapshot for document

📊 Changes

30 files changed (+286 additions, -110 deletions)

View changed files

📝 frontend/app_flowy/lib/user/presentation/router.dart (+17 -6)
📝 frontend/rust-lib/flowy-core/src/lib.rs (+1 -0)
frontend/rust-lib/flowy-database/migrations/2023-01-12-131717_document_rev_snapshot/down.sql (+2 -0)
frontend/rust-lib/flowy-database/migrations/2023-01-12-131717_document_rev_snapshot/up.sql (+9 -0)
📝 frontend/rust-lib/flowy-database/src/schema.rs (+30 -16)
📝 frontend/rust-lib/flowy-document/src/editor/document.rs (+4 -0)
📝 frontend/rust-lib/flowy-document/src/manager.rs (+8 -4)
📝 frontend/rust-lib/flowy-document/src/old_editor/editor.rs (+5 -0)
frontend/rust-lib/flowy-document/src/services/persistence/rev_sqlite/document_snapshot.rs (+96 -0)
📝 frontend/rust-lib/flowy-document/src/services/persistence/rev_sqlite/mod.rs (+2 -0)
📝 frontend/rust-lib/flowy-folder/src/manager.rs (+1 -1)
📝 frontend/rust-lib/flowy-folder/src/services/folder_editor.rs (+15 -3)
📝 frontend/rust-lib/flowy-folder/src/services/persistence/migration.rs (+1 -1)
📝 frontend/rust-lib/flowy-folder/src/services/persistence/mod.rs (+2 -2)
📝 frontend/rust-lib/flowy-folder/src/services/persistence/rev_sqlite/folder_snapshot.rs (+1 -1)
📝 frontend/rust-lib/flowy-folder/src/services/persistence/rev_sqlite/mod.rs (+2 -2)
📝 frontend/rust-lib/flowy-grid/src/manager.rs (+1 -1)
📝 frontend/rust-lib/flowy-grid/src/services/block_editor.rs (+5 -0)
📝 frontend/rust-lib/flowy-grid/src/services/grid_editor.rs (+4 -0)
📝 frontend/rust-lib/flowy-grid/src/services/persistence/rev_sqlite/grid_snapshot.rs (+1 -1)

...and 10 more files

📄 Description

Create a snapshot for folder/document which increase the stabilities of AppFlowy. It can reduce the occurrence of #884 happened. A snapshot contains all the data that can be deserialized into the corresponding object, such as a folder/document/grid.

It will automatically restore from the latest snapshot when facing deserializing errors.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/AppFlowy-IO/AppFlowy/pull/1699 **Author:** [@appflowy](https://github.com/appflowy) **Created:** 1/12/2023 **Status:** ✅ Merged **Merged:** 1/12/2023 **Merged by:** [@appflowy](https://github.com/appflowy) **Base:** `main` ← **Head:** `feat/restore_from_snapshot` --- ### 📝 Commits (2) - [`2574a55`](https://github.com/AppFlowy-IO/AppFlowy/commit/2574a55e58b5c005c34b938d9df69bc652ac01e8) feat: snapshot for folder - [`a045925`](https://github.com/AppFlowy-IO/AppFlowy/commit/a0459256d5425b7aa2faf992603cdb0fbd5d3228) feat: snapshot for document ### 📊 Changes **30 files changed** (+286 additions, -110 deletions) <details> <summary>View changed files</summary> 📝 `frontend/app_flowy/lib/user/presentation/router.dart` (+17 -6) 📝 `frontend/rust-lib/flowy-core/src/lib.rs` (+1 -0) ➕ `frontend/rust-lib/flowy-database/migrations/2023-01-12-131717_document_rev_snapshot/down.sql` (+2 -0) ➕ `frontend/rust-lib/flowy-database/migrations/2023-01-12-131717_document_rev_snapshot/up.sql` (+9 -0) 📝 `frontend/rust-lib/flowy-database/src/schema.rs` (+30 -16) 📝 `frontend/rust-lib/flowy-document/src/editor/document.rs` (+4 -0) 📝 `frontend/rust-lib/flowy-document/src/manager.rs` (+8 -4) 📝 `frontend/rust-lib/flowy-document/src/old_editor/editor.rs` (+5 -0) ➕ `frontend/rust-lib/flowy-document/src/services/persistence/rev_sqlite/document_snapshot.rs` (+96 -0) 📝 `frontend/rust-lib/flowy-document/src/services/persistence/rev_sqlite/mod.rs` (+2 -0) 📝 `frontend/rust-lib/flowy-folder/src/manager.rs` (+1 -1) 📝 `frontend/rust-lib/flowy-folder/src/services/folder_editor.rs` (+15 -3) 📝 `frontend/rust-lib/flowy-folder/src/services/persistence/migration.rs` (+1 -1) 📝 `frontend/rust-lib/flowy-folder/src/services/persistence/mod.rs` (+2 -2) 📝 `frontend/rust-lib/flowy-folder/src/services/persistence/rev_sqlite/folder_snapshot.rs` (+1 -1) 📝 `frontend/rust-lib/flowy-folder/src/services/persistence/rev_sqlite/mod.rs` (+2 -2) 📝 `frontend/rust-lib/flowy-grid/src/manager.rs` (+1 -1) 📝 `frontend/rust-lib/flowy-grid/src/services/block_editor.rs` (+5 -0) 📝 `frontend/rust-lib/flowy-grid/src/services/grid_editor.rs` (+4 -0) 📝 `frontend/rust-lib/flowy-grid/src/services/persistence/rev_sqlite/grid_snapshot.rs` (+1 -1) _...and 10 more files_ </details> ### 📄 Description Create a snapshot for folder/document which increase the stabilities of AppFlowy. It can reduce the occurrence of #884 happened. A snapshot contains all the data that can be deserialized into the corresponding object, such as a folder/document/grid. It will automatically restore from the latest snapshot when facing deserializing errors. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
mirror 2026-03-23 22:16:19 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
AppFlowy-IO/AppFlowy#4900
No description provided.