From 01a94fdfd6b445e9e5456aaf617211c017a2d572 Mon Sep 17 00:00:00 2001 From: nathan Date: Tue, 29 Oct 2024 14:50:00 +0800 Subject: [PATCH] chore: ignore invalid database when import appflowy data --- frontend/appflowy_tauri/src-tauri/Cargo.lock | 16 ++++++++-------- frontend/appflowy_tauri/src-tauri/Cargo.toml | 16 ++++++++-------- frontend/appflowy_web_app/src-tauri/Cargo.lock | 16 ++++++++-------- frontend/appflowy_web_app/src-tauri/Cargo.toml | 16 ++++++++-------- frontend/rust-lib/Cargo.lock | 16 ++++++++-------- frontend/rust-lib/Cargo.toml | 16 ++++++++-------- .../services/data_import/appflowy_data_import.rs | 15 +++++++++++++-- 7 files changed, 61 insertions(+), 50 deletions(-) diff --git a/frontend/appflowy_tauri/src-tauri/Cargo.lock b/frontend/appflowy_tauri/src-tauri/Cargo.lock index c9fc0bc619e9..8125aece0270 100644 --- a/frontend/appflowy_tauri/src-tauri/Cargo.lock +++ b/frontend/appflowy_tauri/src-tauri/Cargo.lock @@ -1030,7 +1030,7 @@ dependencies = [ [[package]] name = "collab" version = "0.2.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=a302e9aaa3a86b7c2fe63992c312959feaf80bc0#a302e9aaa3a86b7c2fe63992c312959feaf80bc0" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=ae51ebef5cfc9805d58e89adca2cff9ea6e0b730#ae51ebef5cfc9805d58e89adca2cff9ea6e0b730" dependencies = [ "anyhow", "arc-swap", @@ -1055,7 +1055,7 @@ dependencies = [ [[package]] name = "collab-database" version = "0.2.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=a302e9aaa3a86b7c2fe63992c312959feaf80bc0#a302e9aaa3a86b7c2fe63992c312959feaf80bc0" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=ae51ebef5cfc9805d58e89adca2cff9ea6e0b730#ae51ebef5cfc9805d58e89adca2cff9ea6e0b730" dependencies = [ "anyhow", "async-trait", @@ -1094,7 +1094,7 @@ dependencies = [ [[package]] name = "collab-document" version = "0.2.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=a302e9aaa3a86b7c2fe63992c312959feaf80bc0#a302e9aaa3a86b7c2fe63992c312959feaf80bc0" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=ae51ebef5cfc9805d58e89adca2cff9ea6e0b730#ae51ebef5cfc9805d58e89adca2cff9ea6e0b730" dependencies = [ "anyhow", "arc-swap", @@ -1115,7 +1115,7 @@ dependencies = [ [[package]] name = "collab-entity" version = "0.2.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=a302e9aaa3a86b7c2fe63992c312959feaf80bc0#a302e9aaa3a86b7c2fe63992c312959feaf80bc0" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=ae51ebef5cfc9805d58e89adca2cff9ea6e0b730#ae51ebef5cfc9805d58e89adca2cff9ea6e0b730" dependencies = [ "anyhow", "bytes", @@ -1135,7 +1135,7 @@ dependencies = [ [[package]] name = "collab-folder" version = "0.2.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=a302e9aaa3a86b7c2fe63992c312959feaf80bc0#a302e9aaa3a86b7c2fe63992c312959feaf80bc0" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=ae51ebef5cfc9805d58e89adca2cff9ea6e0b730#ae51ebef5cfc9805d58e89adca2cff9ea6e0b730" dependencies = [ "anyhow", "arc-swap", @@ -1157,7 +1157,7 @@ dependencies = [ [[package]] name = "collab-importer" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=a302e9aaa3a86b7c2fe63992c312959feaf80bc0#a302e9aaa3a86b7c2fe63992c312959feaf80bc0" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=ae51ebef5cfc9805d58e89adca2cff9ea6e0b730#ae51ebef5cfc9805d58e89adca2cff9ea6e0b730" dependencies = [ "anyhow", "async-recursion", @@ -1218,7 +1218,7 @@ dependencies = [ [[package]] name = "collab-plugins" version = "0.2.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=a302e9aaa3a86b7c2fe63992c312959feaf80bc0#a302e9aaa3a86b7c2fe63992c312959feaf80bc0" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=ae51ebef5cfc9805d58e89adca2cff9ea6e0b730#ae51ebef5cfc9805d58e89adca2cff9ea6e0b730" dependencies = [ "anyhow", "async-stream", @@ -1298,7 +1298,7 @@ dependencies = [ [[package]] name = "collab-user" version = "0.2.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=a302e9aaa3a86b7c2fe63992c312959feaf80bc0#a302e9aaa3a86b7c2fe63992c312959feaf80bc0" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=ae51ebef5cfc9805d58e89adca2cff9ea6e0b730#ae51ebef5cfc9805d58e89adca2cff9ea6e0b730" dependencies = [ "anyhow", "collab", diff --git a/frontend/appflowy_tauri/src-tauri/Cargo.toml b/frontend/appflowy_tauri/src-tauri/Cargo.toml index 19bdd49385aa..5e091e3f9d25 100644 --- a/frontend/appflowy_tauri/src-tauri/Cargo.toml +++ b/frontend/appflowy_tauri/src-tauri/Cargo.toml @@ -120,14 +120,14 @@ custom-protocol = ["tauri/custom-protocol"] # To switch to the local path, run: # scripts/tool/update_collab_source.sh # ⚠️⚠️⚠️️ -collab = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "a302e9aaa3a86b7c2fe63992c312959feaf80bc0" } -collab-entity = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "a302e9aaa3a86b7c2fe63992c312959feaf80bc0" } -collab-folder = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "a302e9aaa3a86b7c2fe63992c312959feaf80bc0" } -collab-document = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "a302e9aaa3a86b7c2fe63992c312959feaf80bc0" } -collab-database = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "a302e9aaa3a86b7c2fe63992c312959feaf80bc0" } -collab-plugins = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "a302e9aaa3a86b7c2fe63992c312959feaf80bc0" } -collab-user = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "a302e9aaa3a86b7c2fe63992c312959feaf80bc0" } -collab-importer = { version = "0.1", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "a302e9aaa3a86b7c2fe63992c312959feaf80bc0" } +collab = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ae51ebef5cfc9805d58e89adca2cff9ea6e0b730" } +collab-entity = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ae51ebef5cfc9805d58e89adca2cff9ea6e0b730" } +collab-folder = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ae51ebef5cfc9805d58e89adca2cff9ea6e0b730" } +collab-document = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ae51ebef5cfc9805d58e89adca2cff9ea6e0b730" } +collab-database = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ae51ebef5cfc9805d58e89adca2cff9ea6e0b730" } +collab-plugins = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ae51ebef5cfc9805d58e89adca2cff9ea6e0b730" } +collab-user = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ae51ebef5cfc9805d58e89adca2cff9ea6e0b730" } +collab-importer = { version = "0.1", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ae51ebef5cfc9805d58e89adca2cff9ea6e0b730" } # Working directory: frontend # To update the commit ID, run: diff --git a/frontend/appflowy_web_app/src-tauri/Cargo.lock b/frontend/appflowy_web_app/src-tauri/Cargo.lock index b202cd32b50b..a01f0b0d493f 100644 --- a/frontend/appflowy_web_app/src-tauri/Cargo.lock +++ b/frontend/appflowy_web_app/src-tauri/Cargo.lock @@ -1028,7 +1028,7 @@ dependencies = [ [[package]] name = "collab" version = "0.2.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=a302e9aaa3a86b7c2fe63992c312959feaf80bc0#a302e9aaa3a86b7c2fe63992c312959feaf80bc0" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=ae51ebef5cfc9805d58e89adca2cff9ea6e0b730#ae51ebef5cfc9805d58e89adca2cff9ea6e0b730" dependencies = [ "anyhow", "arc-swap", @@ -1053,7 +1053,7 @@ dependencies = [ [[package]] name = "collab-database" version = "0.2.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=a302e9aaa3a86b7c2fe63992c312959feaf80bc0#a302e9aaa3a86b7c2fe63992c312959feaf80bc0" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=ae51ebef5cfc9805d58e89adca2cff9ea6e0b730#ae51ebef5cfc9805d58e89adca2cff9ea6e0b730" dependencies = [ "anyhow", "async-trait", @@ -1092,7 +1092,7 @@ dependencies = [ [[package]] name = "collab-document" version = "0.2.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=a302e9aaa3a86b7c2fe63992c312959feaf80bc0#a302e9aaa3a86b7c2fe63992c312959feaf80bc0" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=ae51ebef5cfc9805d58e89adca2cff9ea6e0b730#ae51ebef5cfc9805d58e89adca2cff9ea6e0b730" dependencies = [ "anyhow", "arc-swap", @@ -1113,7 +1113,7 @@ dependencies = [ [[package]] name = "collab-entity" version = "0.2.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=a302e9aaa3a86b7c2fe63992c312959feaf80bc0#a302e9aaa3a86b7c2fe63992c312959feaf80bc0" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=ae51ebef5cfc9805d58e89adca2cff9ea6e0b730#ae51ebef5cfc9805d58e89adca2cff9ea6e0b730" dependencies = [ "anyhow", "bytes", @@ -1133,7 +1133,7 @@ dependencies = [ [[package]] name = "collab-folder" version = "0.2.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=a302e9aaa3a86b7c2fe63992c312959feaf80bc0#a302e9aaa3a86b7c2fe63992c312959feaf80bc0" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=ae51ebef5cfc9805d58e89adca2cff9ea6e0b730#ae51ebef5cfc9805d58e89adca2cff9ea6e0b730" dependencies = [ "anyhow", "arc-swap", @@ -1155,7 +1155,7 @@ dependencies = [ [[package]] name = "collab-importer" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=a302e9aaa3a86b7c2fe63992c312959feaf80bc0#a302e9aaa3a86b7c2fe63992c312959feaf80bc0" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=ae51ebef5cfc9805d58e89adca2cff9ea6e0b730#ae51ebef5cfc9805d58e89adca2cff9ea6e0b730" dependencies = [ "anyhow", "async-recursion", @@ -1216,7 +1216,7 @@ dependencies = [ [[package]] name = "collab-plugins" version = "0.2.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=a302e9aaa3a86b7c2fe63992c312959feaf80bc0#a302e9aaa3a86b7c2fe63992c312959feaf80bc0" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=ae51ebef5cfc9805d58e89adca2cff9ea6e0b730#ae51ebef5cfc9805d58e89adca2cff9ea6e0b730" dependencies = [ "anyhow", "async-stream", @@ -1296,7 +1296,7 @@ dependencies = [ [[package]] name = "collab-user" version = "0.2.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=a302e9aaa3a86b7c2fe63992c312959feaf80bc0#a302e9aaa3a86b7c2fe63992c312959feaf80bc0" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=ae51ebef5cfc9805d58e89adca2cff9ea6e0b730#ae51ebef5cfc9805d58e89adca2cff9ea6e0b730" dependencies = [ "anyhow", "collab", diff --git a/frontend/appflowy_web_app/src-tauri/Cargo.toml b/frontend/appflowy_web_app/src-tauri/Cargo.toml index a85f9130c15c..4e4e18e69002 100644 --- a/frontend/appflowy_web_app/src-tauri/Cargo.toml +++ b/frontend/appflowy_web_app/src-tauri/Cargo.toml @@ -118,14 +118,14 @@ custom-protocol = ["tauri/custom-protocol"] # To switch to the local path, run: # scripts/tool/update_collab_source.sh # ⚠️⚠️⚠️️ -collab = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "a302e9aaa3a86b7c2fe63992c312959feaf80bc0" } -collab-entity = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "a302e9aaa3a86b7c2fe63992c312959feaf80bc0" } -collab-folder = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "a302e9aaa3a86b7c2fe63992c312959feaf80bc0" } -collab-document = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "a302e9aaa3a86b7c2fe63992c312959feaf80bc0" } -collab-database = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "a302e9aaa3a86b7c2fe63992c312959feaf80bc0" } -collab-plugins = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "a302e9aaa3a86b7c2fe63992c312959feaf80bc0" } -collab-user = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "a302e9aaa3a86b7c2fe63992c312959feaf80bc0" } -collab-importer = { version = "0.1", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "a302e9aaa3a86b7c2fe63992c312959feaf80bc0" } +collab = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ae51ebef5cfc9805d58e89adca2cff9ea6e0b730" } +collab-entity = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ae51ebef5cfc9805d58e89adca2cff9ea6e0b730" } +collab-folder = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ae51ebef5cfc9805d58e89adca2cff9ea6e0b730" } +collab-document = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ae51ebef5cfc9805d58e89adca2cff9ea6e0b730" } +collab-database = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ae51ebef5cfc9805d58e89adca2cff9ea6e0b730" } +collab-plugins = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ae51ebef5cfc9805d58e89adca2cff9ea6e0b730" } +collab-user = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ae51ebef5cfc9805d58e89adca2cff9ea6e0b730" } +collab-importer = { version = "0.1", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ae51ebef5cfc9805d58e89adca2cff9ea6e0b730" } # Working directory: frontend diff --git a/frontend/rust-lib/Cargo.lock b/frontend/rust-lib/Cargo.lock index b849c446019f..1d42d9832b93 100644 --- a/frontend/rust-lib/Cargo.lock +++ b/frontend/rust-lib/Cargo.lock @@ -891,7 +891,7 @@ dependencies = [ [[package]] name = "collab" version = "0.2.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=a302e9aaa3a86b7c2fe63992c312959feaf80bc0#a302e9aaa3a86b7c2fe63992c312959feaf80bc0" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=ae51ebef5cfc9805d58e89adca2cff9ea6e0b730#ae51ebef5cfc9805d58e89adca2cff9ea6e0b730" dependencies = [ "anyhow", "arc-swap", @@ -916,7 +916,7 @@ dependencies = [ [[package]] name = "collab-database" version = "0.2.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=a302e9aaa3a86b7c2fe63992c312959feaf80bc0#a302e9aaa3a86b7c2fe63992c312959feaf80bc0" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=ae51ebef5cfc9805d58e89adca2cff9ea6e0b730#ae51ebef5cfc9805d58e89adca2cff9ea6e0b730" dependencies = [ "anyhow", "async-trait", @@ -955,7 +955,7 @@ dependencies = [ [[package]] name = "collab-document" version = "0.2.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=a302e9aaa3a86b7c2fe63992c312959feaf80bc0#a302e9aaa3a86b7c2fe63992c312959feaf80bc0" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=ae51ebef5cfc9805d58e89adca2cff9ea6e0b730#ae51ebef5cfc9805d58e89adca2cff9ea6e0b730" dependencies = [ "anyhow", "arc-swap", @@ -976,7 +976,7 @@ dependencies = [ [[package]] name = "collab-entity" version = "0.2.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=a302e9aaa3a86b7c2fe63992c312959feaf80bc0#a302e9aaa3a86b7c2fe63992c312959feaf80bc0" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=ae51ebef5cfc9805d58e89adca2cff9ea6e0b730#ae51ebef5cfc9805d58e89adca2cff9ea6e0b730" dependencies = [ "anyhow", "bytes", @@ -996,7 +996,7 @@ dependencies = [ [[package]] name = "collab-folder" version = "0.2.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=a302e9aaa3a86b7c2fe63992c312959feaf80bc0#a302e9aaa3a86b7c2fe63992c312959feaf80bc0" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=ae51ebef5cfc9805d58e89adca2cff9ea6e0b730#ae51ebef5cfc9805d58e89adca2cff9ea6e0b730" dependencies = [ "anyhow", "arc-swap", @@ -1018,7 +1018,7 @@ dependencies = [ [[package]] name = "collab-importer" version = "0.1.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=a302e9aaa3a86b7c2fe63992c312959feaf80bc0#a302e9aaa3a86b7c2fe63992c312959feaf80bc0" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=ae51ebef5cfc9805d58e89adca2cff9ea6e0b730#ae51ebef5cfc9805d58e89adca2cff9ea6e0b730" dependencies = [ "anyhow", "async-recursion", @@ -1079,7 +1079,7 @@ dependencies = [ [[package]] name = "collab-plugins" version = "0.2.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=a302e9aaa3a86b7c2fe63992c312959feaf80bc0#a302e9aaa3a86b7c2fe63992c312959feaf80bc0" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=ae51ebef5cfc9805d58e89adca2cff9ea6e0b730#ae51ebef5cfc9805d58e89adca2cff9ea6e0b730" dependencies = [ "anyhow", "async-stream", @@ -1159,7 +1159,7 @@ dependencies = [ [[package]] name = "collab-user" version = "0.2.0" -source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=a302e9aaa3a86b7c2fe63992c312959feaf80bc0#a302e9aaa3a86b7c2fe63992c312959feaf80bc0" +source = "git+https://github.com/AppFlowy-IO/AppFlowy-Collab?rev=ae51ebef5cfc9805d58e89adca2cff9ea6e0b730#ae51ebef5cfc9805d58e89adca2cff9ea6e0b730" dependencies = [ "anyhow", "collab", diff --git a/frontend/rust-lib/Cargo.toml b/frontend/rust-lib/Cargo.toml index ad826a0ba0c5..5bb3a6d4ab9b 100644 --- a/frontend/rust-lib/Cargo.toml +++ b/frontend/rust-lib/Cargo.toml @@ -142,14 +142,14 @@ rocksdb = { git = "https://github.com/rust-rocksdb/rust-rocksdb", rev = "1710120 # To switch to the local path, run: # scripts/tool/update_collab_source.sh # ⚠️⚠️⚠️️ -collab = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "a302e9aaa3a86b7c2fe63992c312959feaf80bc0" } -collab-entity = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "a302e9aaa3a86b7c2fe63992c312959feaf80bc0" } -collab-folder = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "a302e9aaa3a86b7c2fe63992c312959feaf80bc0" } -collab-document = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "a302e9aaa3a86b7c2fe63992c312959feaf80bc0" } -collab-database = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "a302e9aaa3a86b7c2fe63992c312959feaf80bc0" } -collab-plugins = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "a302e9aaa3a86b7c2fe63992c312959feaf80bc0" } -collab-user = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "a302e9aaa3a86b7c2fe63992c312959feaf80bc0" } -collab-importer = { version = "0.1", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "a302e9aaa3a86b7c2fe63992c312959feaf80bc0" } +collab = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ae51ebef5cfc9805d58e89adca2cff9ea6e0b730" } +collab-entity = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ae51ebef5cfc9805d58e89adca2cff9ea6e0b730" } +collab-folder = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ae51ebef5cfc9805d58e89adca2cff9ea6e0b730" } +collab-document = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ae51ebef5cfc9805d58e89adca2cff9ea6e0b730" } +collab-database = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ae51ebef5cfc9805d58e89adca2cff9ea6e0b730" } +collab-plugins = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ae51ebef5cfc9805d58e89adca2cff9ea6e0b730" } +collab-user = { version = "0.2", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ae51ebef5cfc9805d58e89adca2cff9ea6e0b730" } +collab-importer = { version = "0.1", git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ae51ebef5cfc9805d58e89adca2cff9ea6e0b730" } # Working directory: frontend # To update the commit ID, run: diff --git a/frontend/rust-lib/flowy-user/src/services/data_import/appflowy_data_import.rs b/frontend/rust-lib/flowy-user/src/services/data_import/appflowy_data_import.rs index 57c4b64d20c0..f9657d45cf48 100644 --- a/frontend/rust-lib/flowy-user/src/services/data_import/appflowy_data_import.rs +++ b/frontend/rust-lib/flowy-user/src/services/data_import/appflowy_data_import.rs @@ -169,6 +169,7 @@ pub(crate) fn generate_import_data( }; let (views, orphan_views) = user_collab_db.with_write_txn(|current_collab_db_write_txn| { + let imported_uid = imported_folder.imported_session.user_id; let imported_collab_db_read_txn = imported_collab_db.read_txn(); // use the old_to_new_id_map to keep track of the other collab object id and the new collab object id let mut old_to_new_id_map = OldToNewIdMap::new(); @@ -179,6 +180,8 @@ pub(crate) fn generate_import_data( .map(|iter| iter.collect::>()) .unwrap_or_default(); + info!("[AppflowyData]: {} has {} collab objects", imported_uid, all_imported_object_ids.len()); + // when doing import, we don't want to import these objects: // 1. user workspace // 2. workspace database views @@ -580,9 +583,17 @@ where } database_object_ids.push(object_id.clone()); - reset_inline_view_id(database_collab, |old_inline_view_id| { + if reset_inline_view_id(database_collab, |old_inline_view_id| { old_to_new_id_map.exchange_new_id(&old_inline_view_id) - }); + }) + .is_err() + { + error!( + "[AppflowyData]: reset inline view id failed for database: {}", + object_id + ); + continue; + } mut_database_views_with_collab(database_collab, |database_view| { let new_view_id = old_to_new_id_map.exchange_new_id(&database_view.id);