Bring projects, wikis, and teams together with AI. AppFlowy is the AI collaborative workspace where you achieve more without losing control of your data. The leading open source Notion alternative.
Dart blogconfluence-alternativecontent-managementcontent-servicesdocumentationflutternote-takingnotion-alternativeproject-managementtask-managementteam-collaborationwiki
chore: remove unused sqlite table (#2704)
Nathan.fooof2dd58a4f1ed
diff --git a/frontend/rust-lib/flowy-sqlite/migrations/2021-07-09-063045_user/down.sql b/frontend/rust-lib/flowy-sqlite/migrations/2021-07-09-063045_user/down.sqldeleted file mode 100644index 77ba5442e2..0000000000--- a/frontend/rust-lib/flowy-sqlite/migrations/2021-07-09-063045_user/down.sql+++ /dev/null@@ -1,5 +0,0 @@--- This file should undo anything in `up.sql`-DROP TABLE user_table;-DROP TABLE workspace_table;-DROP TABLE app_table;-DROP TABLE view_table;\ No newline at end of filediff --git a/frontend/rust-lib/flowy-sqlite/migrations/2021-07-09-063045_user/up.sql b/frontend/rust-lib/flowy-sqlite/migrations/2021-07-09-063045_user/up.sqldeleted file mode 100644index 75f78cfec3..0000000000--- a/frontend/rust-lib/flowy-sqlite/migrations/2021-07-09-063045_user/up.sql+++ /dev/null@@ -1,53 +0,0 @@--- Your SQL goes here--CREATE TABLE user_table (- id TEXT NOT NULL PRIMARY KEY,- name TEXT NOT NULL DEFAULT '',- token TEXT NOT NULL DEFAULT '',- email TEXT NOT NULL DEFAULT ''-);--CREATE TABLE workspace_table (- id TEXT NOT NULL PRIMARY KEY,- name TEXT NOT NULL DEFAULT '',- desc TEXT NOT NULL DEFAULT '',- modified_time BIGINT NOT NULL DEFAULT 0,- create_time BIGINT NOT NULL DEFAULT 0,- user_id TEXT NOT NULL DEFAULT '',- version BIGINT NOT NULL DEFAULT 0-);--CREATE TABLE app_table (- id TEXT NOT NULL PRIMARY KEY,- workspace_id TEXT NOT NULL DEFAULT '',- name TEXT NOT NULL DEFAULT '',- desc TEXT NOT NULL DEFAULT '',- color_style BLOB NOT NULL DEFAULT (x''),- last_view_id TEXT DEFAULT '',- modified_time BIGINT NOT NULL DEFAULT 0,- create_time BIGINT NOT NULL DEFAULT 0,- version BIGINT NOT NULL DEFAULT 0,- is_trash Boolean NOT NULL DEFAULT false-);--CREATE TABLE view_table (- id TEXT NOT NULL PRIMARY KEY,- belong_to_id TEXT NOT NULL DEFAULT '',- name TEXT NOT NULL DEFAULT '',- desc TEXT NOT NULL DEFAULT '',- modified_time BIGINT NOT NULL DEFAULT 0,- create_time BIGINT NOT NULL DEFAULT 0,- thumbnail TEXT NOT NULL DEFAULT '',- view_type INTEGER NOT NULL DEFAULT 0,- version BIGINT NOT NULL DEFAULT 0,- is_trash Boolean NOT NULL DEFAULT false-);--CREATE TABLE trash_table (- id TEXT NOT NULL PRIMARY KEY,- name TEXT NOT NULL DEFAULT '',- desc TEXT NOT NULL DEFAULT '',- modified_time BIGINT NOT NULL DEFAULT 0,- create_time BIGINT NOT NULL DEFAULT 0,- ty INTEGER NOT NULL DEFAULT 0-);diff --git a/frontend/rust-lib/flowy-sqlite/migrations/2021-07-14-022241_user-add-col/down.sql b/frontend/rust-lib/flowy-sqlite/migrations/2021-07-14-022241_user-add-col/down.sqldeleted file mode 100644index b125f69360..0000000000--- a/frontend/rust-lib/flowy-sqlite/migrations/2021-07-14-022241_user-add-col/down.sql+++ /dev/null@@ -1,2 +0,0 @@--- This file should undo anything in `up.sql`-ALTER TABLE user_table DROP COLUMN workspace;\ No newline at end of filediff --git a/frontend/rust-lib/flowy-sqlite/migrations/2021-07-14-022241_user-add-col/up.sql b/frontend/rust-lib/flowy-sqlite/migrations/2021-07-14-022241_user-add-col/up.sqldeleted file mode 100644index 81d091085d..0000000000--- a/frontend/rust-lib/flowy-sqlite/migrations/2021-07-14-022241_user-add-col/up.sql+++ /dev/null@@ -1,2 +0,0 @@--- Your SQL goes here-ALTER TABLE user_table ADD COLUMN workspace TEXT NOT NULL DEFAULT '';\ No newline at end of filediff --git a/frontend/rust-lib/flowy-sqlite/migrations/2021-09-22-074638_revision/up.sql b/frontend/rust-lib/flowy-sqlite/migrations/2021-09-22-074638_revision/up.sqldeleted file mode 100644index 69a6284ed3..0000000000--- a/frontend/rust-lib/flowy-sqlite/migrations/2021-09-22-074638_revision/up.sql+++ /dev/null@@ -1,10 +0,0 @@--- Your SQL goes here-CREATE TABLE rev_table (- id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,- doc_id TEXT NOT NULL DEFAULT '',- base_rev_id BIGINT NOT NULL DEFAULT 0,- rev_id BIGINT NOT NULL DEFAULT 0,- data BLOB NOT NULL DEFAULT (x''),- state INTEGER NOT NULL DEFAULT 0,- ty INTEGER NOT NULL DEFAULT 0-);\ No newline at end of filediff --git a/frontend/rust-lib/flowy-sqlite/migrations/2022-03-11-025536_grid/down.sql b/frontend/rust-lib/flowy-sqlite/migrations/2022-03-11-025536_grid/down.sqldeleted file mode 100644index 54ad291ac7..0000000000--- a/frontend/rust-lib/flowy-sqlite/migrations/2022-03-11-025536_grid/down.sql+++ /dev/null@@ -1,4 +0,0 @@--- This file should undo anything in `up.sql`-DROP TABLE kv_table;-DROP TABLE grid_rev_table;-DROP TABLE grid_meta_rev_table;\ No newline at end of filediff --git a/frontend/rust-lib/flowy-sqlite/migrations/2022-03-11-025536_grid/up.sql b/frontend/rust-lib/flowy-sqlite/migrations/2022-03-11-025536_grid/up.sqldeleted file mode 100644index 655533fc93..0000000000--- a/frontend/rust-lib/flowy-sqlite/migrations/2022-03-11-025536_grid/up.sql+++ /dev/null@@ -1,22 +0,0 @@--- Your SQL goes here-CREATE TABLE kv_table (- key TEXT NOT NULL PRIMARY KEY,- value BLOB NOT NULL DEFAULT (x'')-);-CREATE TABLE grid_rev_table (- id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,- object_id TEXT NOT NULL DEFAULT '',- base_rev_id BIGINT NOT NULL DEFAULT 0,- rev_id BIGINT NOT NULL DEFAULT 0,- data BLOB NOT NULL DEFAULT (x''),- state INTEGER NOT NULL DEFAULT 0-);--CREATE TABLE grid_meta_rev_table (- id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,- object_id TEXT NOT NULL DEFAULT '',- base_rev_id BIGINT NOT NULL DEFAULT 0,- rev_id BIGINT NOT NULL DEFAULT 0,- data BLOB NOT NULL DEFAULT (x''),- state INTEGER NOT NULL DEFAULT 0-);\ No newline at end of filediff --git a/frontend/rust-lib/flowy-sqlite/migrations/2022-04-05-015536_grid-block-index/down.sql b/frontend/rust-lib/flowy-sqlite/migrations/2022-04-05-015536_grid-block-index/down.sqldeleted file mode 100644index 06daaca7de..0000000000--- a/frontend/rust-lib/flowy-sqlite/migrations/2022-04-05-015536_grid-block-index/down.sql+++ /dev/null@@ -1,3 +0,0 @@--- This file should undo anything in `up.sql`-DROP TABLE grid_block_index_table;--- DROP TABLE grid_block_fts_table;\ No newline at end of filediff --git a/frontend/rust-lib/flowy-sqlite/migrations/2022-04-05-015536_grid-block-index/up.sql b/frontend/rust-lib/flowy-sqlite/migrations/2022-04-05-015536_grid-block-index/up.sqldeleted file mode 100644index f55bc82f64..0000000000--- a/frontend/rust-lib/flowy-sqlite/migrations/2022-04-05-015536_grid-block-index/up.sql+++ /dev/null@@ -1,7 +0,0 @@--- Your SQL goes here-CREATE TABLE grid_block_index_table (- row_id TEXT NOT NULL PRIMARY KEY,- block_id TEXT NOT NULL-);---- CREATE VIRTUAL TABLE grid_block_fts_table USING FTS5(content, grid_id, block_id, row_id);\ No newline at end of filediff --git a/frontend/rust-lib/flowy-sqlite/migrations/2022-06-10-140131_revision-snapshot/down.sql b/frontend/rust-lib/flowy-sqlite/migrations/2022-06-10-140131_revision-snapshot/down.sqldeleted file mode 100644index 01a87a1e99..0000000000--- a/frontend/rust-lib/flowy-sqlite/migrations/2022-06-10-140131_revision-snapshot/down.sql+++ /dev/null@@ -1,2 +0,0 @@--- This file should undo anything in `up.sql`-DROP TABLE rev_snapshot;\ No newline at end of filediff --git a/frontend/rust-lib/flowy-sqlite/migrations/2022-06-10-140131_revision-snapshot/up.sql b/frontend/rust-lib/flowy-sqlite/migrations/2022-06-10-140131_revision-snapshot/up.sqldeleted file mode 100644index 9656dabc3c..0000000000--- a/frontend/rust-lib/flowy-sqlite/migrations/2022-06-10-140131_revision-snapshot/up.sql+++ /dev/null@@ -1,7 +0,0 @@--- Your SQL goes here-CREATE TABLE rev_snapshot (- id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,- object_id TEXT NOT NULL DEFAULT '',- rev_id BIGINT NOT NULL DEFAULT 0,- data BLOB NOT NULL DEFAULT (x'')-);\ No newline at end of filediff --git a/frontend/rust-lib/flowy-sqlite/migrations/2022-06-11-090029_view-add-col/down.sql b/frontend/rust-lib/flowy-sqlite/migrations/2022-06-11-090029_view-add-col/down.sqldeleted file mode 100644index df82040abc..0000000000--- a/frontend/rust-lib/flowy-sqlite/migrations/2022-06-11-090029_view-add-col/down.sql+++ /dev/null@@ -1,2 +0,0 @@--- This file should undo anything in `up.sql`-ALTER TABLE view_table DROP COLUMN ext_data;\ No newline at end of filediff --git a/frontend/rust-lib/flowy-sqlite/migrations/2022-06-11-090029_view-add-col/up.sql b/frontend/rust-lib/flowy-sqlite/migrations/2022-06-11-090029_view-add-col/up.sqldeleted file mode 100644index c4545a457c..0000000000--- a/frontend/rust-lib/flowy-sqlite/migrations/2022-06-11-090029_view-add-col/up.sql+++ /dev/null@@ -1,2 +0,0 @@--- Your SQL goes here-ALTER TABLE view_table ADD COLUMN ext_data TEXT NOT NULL DEFAULT '';\ No newline at end of filediff --git a/frontend/rust-lib/flowy-sqlite/migrations/2022-08-08-110959_user-add-icon/down.sql b/frontend/rust-lib/flowy-sqlite/migrations/2022-08-08-110959_user-add-icon/down.sqldeleted file mode 100644index 505fbd4b2f..0000000000--- a/frontend/rust-lib/flowy-sqlite/migrations/2022-08-08-110959_user-add-icon/down.sql+++ /dev/null@@ -1 +0,0 @@-ALTER TABLE user_table DROP COLUMN icon_url;diff --git a/frontend/rust-lib/flowy-sqlite/migrations/2022-08-08-110959_user-add-icon/up.sql b/frontend/rust-lib/flowy-sqlite/migrations/2022-08-08-110959_user-add-icon/up.sqldeleted file mode 100644index c2aee5e3de..0000000000--- a/frontend/rust-lib/flowy-sqlite/migrations/2022-08-08-110959_user-add-icon/up.sql+++ /dev/null@@ -1 +0,0 @@-ALTER TABLE user_table ADD COLUMN icon_url TEXT NOT NULL DEFAULT '';diff --git a/frontend/rust-lib/flowy-sqlite/migrations/2022-08-15-020544_grid-view/down.sql b/frontend/rust-lib/flowy-sqlite/migrations/2022-08-15-020544_grid-view/down.sqldeleted file mode 100644index aff09f3bb9..0000000000--- a/frontend/rust-lib/flowy-sqlite/migrations/2022-08-15-020544_grid-view/down.sql+++ /dev/null@@ -1,2 +0,0 @@--- This file should undo anything in `up.sql`-DROP TABLE grid_view_rev_table;\ No newline at end of filediff --git a/frontend/rust-lib/flowy-sqlite/migrations/2022-08-15-020544_grid-view/up.sql b/frontend/rust-lib/flowy-sqlite/migrations/2022-08-15-020544_grid-view/up.sqldeleted file mode 100644index e2b39801e1..0000000000--- a/frontend/rust-lib/flowy-sqlite/migrations/2022-08-15-020544_grid-view/up.sql+++ /dev/null@@ -1,11 +0,0 @@--- Your SQL goes here---CREATE TABLE grid_view_rev_table (- id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,- object_id TEXT NOT NULL DEFAULT '',- base_rev_id BIGINT NOT NULL DEFAULT 0,- rev_id BIGINT NOT NULL DEFAULT 0,- data BLOB NOT NULL DEFAULT (x''),- state INTEGER NOT NULL DEFAULT 0-);diff --git a/frontend/rust-lib/flowy-sqlite/migrations/2022-10-22-033122_document/down.sql b/frontend/rust-lib/flowy-sqlite/migrations/2022-10-22-033122_document/down.sqldeleted file mode 100644index 46d0fce4d8..0000000000--- a/frontend/rust-lib/flowy-sqlite/migrations/2022-10-22-033122_document/down.sql+++ /dev/null@@ -1,2 +0,0 @@--- This file should undo anything in `up.sql`-DROP TABLE grid_view_rev_table;diff --git a/frontend/rust-lib/flowy-sqlite/migrations/2022-10-22-033122_document/up.sql b/frontend/rust-lib/flowy-sqlite/migrations/2022-10-22-033122_document/up.sqldeleted file mode 100644index 34d4e71d41..0000000000--- a/frontend/rust-lib/flowy-sqlite/migrations/2022-10-22-033122_document/up.sql+++ /dev/null@@ -1,9 +0,0 @@--- Your SQL goes here-CREATE TABLE document_rev_table (- id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,- document_id TEXT NOT NULL DEFAULT '',- base_rev_id BIGINT NOT NULL DEFAULT 0,- rev_id BIGINT NOT NULL DEFAULT 0,- data BLOB NOT NULL DEFAULT (x''),- state INTEGER NOT NULL DEFAULT 0-);diff --git a/frontend/rust-lib/flowy-sqlite/migrations/2022-12-08-011428_grid_rev_snapshot/down.sql b/frontend/rust-lib/flowy-sqlite/migrations/2022-12-08-011428_grid_rev_snapshot/down.sqldeleted file mode 100644index 5fdde7bc70..0000000000--- a/frontend/rust-lib/flowy-sqlite/migrations/2022-12-08-011428_grid_rev_snapshot/down.sql+++ /dev/null@@ -1,2 +0,0 @@--- This file should undo anything in `up.sql`-DROP TABLE grid_rev_snapshot;diff --git a/frontend/rust-lib/flowy-sqlite/migrations/2022-12-08-011428_grid_rev_snapshot/up.sql b/frontend/rust-lib/flowy-sqlite/migrations/2022-12-08-011428_grid_rev_snapshot/up.sqldeleted file mode 100644index 4541897666..0000000000--- a/frontend/rust-lib/flowy-sqlite/migrations/2022-12-08-011428_grid_rev_snapshot/up.sql+++ /dev/null@@ -1,9 +0,0 @@--- Your SQL goes here-CREATE TABLE grid_rev_snapshot (- snapshot_id TEXT NOT NULL PRIMARY KEY DEFAULT '',- object_id TEXT NOT NULL DEFAULT '',- rev_id BIGINT NOT NULL DEFAULT 0,- base_rev_id BIGINT NOT NULL DEFAULT 0,- timestamp BIGINT NOT NULL DEFAULT 0,- data BLOB NOT NULL DEFAULT (x'')-);\ No newline at end of filediff --git a/frontend/rust-lib/flowy-sqlite/migrations/2023-01-06-032859_folder_rev_snapshot/down.sql b/frontend/rust-lib/flowy-sqlite/migrations/2023-01-06-032859_folder_rev_snapshot/down.sqldeleted file mode 100644index a1b31de5bf..0000000000--- a/frontend/rust-lib/flowy-sqlite/migrations/2023-01-06-032859_folder_rev_snapshot/down.sql+++ /dev/null@@ -1,2 +0,0 @@--- This file should undo anything in `up.sql`-DROP TABLE folder_rev_snapshot;\ No newline at end of filediff --git a/frontend/rust-lib/flowy-sqlite/migrations/2023-01-06-032859_folder_rev_snapshot/up.sql b/frontend/rust-lib/flowy-sqlite/migrations/2023-01-06-032859_folder_rev_snapshot/up.sqldeleted file mode 100644index 784b15295c..0000000000--- a/frontend/rust-lib/flowy-sqlite/migrations/2023-01-06-032859_folder_rev_snapshot/up.sql+++ /dev/null@@ -1,9 +0,0 @@--- Your SQL goes here-CREATE TABLE folder_rev_snapshot (- snapshot_id TEXT NOT NULL PRIMARY KEY DEFAULT '',- object_id TEXT NOT NULL DEFAULT '',- rev_id BIGINT NOT NULL DEFAULT 0,- base_rev_id BIGINT NOT NULL DEFAULT 0,- timestamp BIGINT NOT NULL DEFAULT 0,- data BLOB NOT NULL DEFAULT (x'')-);\ No newline at end of filediff --git a/frontend/rust-lib/flowy-sqlite/migrations/2023-01-12-131717_document_rev_snapshot/down.sql b/frontend/rust-lib/flowy-sqlite/migrations/2023-01-12-131717_document_rev_snapshot/down.sqldeleted file mode 100644index 5220bab0d3..0000000000--- a/frontend/rust-lib/flowy-sqlite/migrations/2023-01-12-131717_document_rev_snapshot/down.sql+++ /dev/null@@ -1,2 +0,0 @@--- This file should undo anything in `up.sql`-DROP TABLE document_rev_snapshot;diff --git a/frontend/rust-lib/flowy-sqlite/migrations/2023-01-12-131717_document_rev_snapshot/up.sql b/frontend/rust-lib/flowy-sqlite/migrations/2023-01-12-131717_document_rev_snapshot/up.sqldeleted file mode 100644index bc6ffb0cee..0000000000--- a/frontend/rust-lib/flowy-sqlite/migrations/2023-01-12-131717_document_rev_snapshot/up.sql+++ /dev/null@@ -1,9 +0,0 @@--- Your SQL goes here-CREATE TABLE document_rev_snapshot (- snapshot_id TEXT NOT NULL PRIMARY KEY DEFAULT '',- object_id TEXT NOT NULL DEFAULT '',- rev_id BIGINT NOT NULL DEFAULT 0,- base_rev_id BIGINT NOT NULL DEFAULT 0,- timestamp BIGINT NOT NULL DEFAULT 0,- data BLOB NOT NULL DEFAULT (x'')-);\ No newline at end of filediff --git a/frontend/rust-lib/flowy-sqlite/migrations/2023-02-13-102237_user-add-openai_key/down.sql b/frontend/rust-lib/flowy-sqlite/migrations/2023-02-13-102237_user-add-openai_key/down.sqldeleted file mode 100644index ee523bb123..0000000000--- a/frontend/rust-lib/flowy-sqlite/migrations/2023-02-13-102237_user-add-openai_key/down.sql+++ /dev/null@@ -1 +0,0 @@-ALTER TABLE user_table DROP COLUMN openai_key;\ No newline at end of filediff --git a/frontend/rust-lib/flowy-sqlite/migrations/2023-02-13-102237_user-add-openai_key/up.sql b/frontend/rust-lib/flowy-sqlite/migrations/2023-02-13-102237_user-add-openai_key/up.sqldeleted file mode 100644index f4882693d9..0000000000--- a/frontend/rust-lib/flowy-sqlite/migrations/2023-02-13-102237_user-add-openai_key/up.sql+++ /dev/null@@ -1 +0,0 @@-ALTER TABLE user_table ADD COLUMN openai_key TEXT NOT NULL DEFAULT '';\ No newline at end of filediff --git a/frontend/rust-lib/flowy-sqlite/migrations/2023-02-25-022539_database_refs/down.sql b/frontend/rust-lib/flowy-sqlite/migrations/2023-02-25-022539_database_refs/down.sqldeleted file mode 100644index 8ced41d566..0000000000--- a/frontend/rust-lib/flowy-sqlite/migrations/2023-02-25-022539_database_refs/down.sql+++ /dev/null@@ -1,2 +0,0 @@--- This file should undo anything in `up.sql`-DROP TABLE database_refs;\ No newline at end of filediff --git a/frontend/rust-lib/flowy-sqlite/migrations/2023-02-25-022539_database_refs/up.sql b/frontend/rust-lib/flowy-sqlite/migrations/2023-02-25-022539_database_refs/up.sqldeleted file mode 100644index 17aabefb4a..0000000000--- a/frontend/rust-lib/flowy-sqlite/migrations/2023-02-25-022539_database_refs/up.sql+++ /dev/null@@ -1,8 +0,0 @@--- Your SQL goes here-CREATE TABLE database_refs (- ref_id TEXT NOT NULL PRIMARY KEY DEFAULT '',- name TEXT NOT NULL DEFAULT '',- is_base Boolean NOT NULL DEFAULT false,- view_id TEXT NOT NULL DEFAULT '',- database_id TEXT NOT NULL DEFAULT ''-);\ No newline at end of filediff --git a/frontend/rust-lib/flowy-sqlite/migrations/2021-09-22-074638_revision/down.sql b/frontend/rust-lib/flowy-sqlite/migrations/2023-06-05-023648_user/down.sqlsimilarity index 66%rename from frontend/rust-lib/flowy-sqlite/migrations/2021-09-22-074638_revision/down.sqlrename to frontend/rust-lib/flowy-sqlite/migrations/2023-06-05-023648_user/down.sqlindex 3f706119bd..381259bd9f 100644--- a/frontend/rust-lib/flowy-sqlite/migrations/2021-09-22-074638_revision/down.sql+++ b/frontend/rust-lib/flowy-sqlite/migrations/2023-06-05-023648_user/down.sql@@ -1,2 +1,2 @@-- This file should undo anything in `up.sql`-DROP TABLE rev_table;\ No newline at end of file+DROP TABLE user_table;diff --git a/frontend/rust-lib/flowy-sqlite/migrations/2023-06-05-023648_user/up.sql b/frontend/rust-lib/flowy-sqlite/migrations/2023-06-05-023648_user/up.sqlnew file mode 100644index 0000000000..b29067e75a--- /dev/null+++ b/frontend/rust-lib/flowy-sqlite/migrations/2023-06-05-023648_user/up.sql@@ -0,0 +1,10 @@+-- Your SQL goes here+CREATE TABLE user_table (+ id TEXT NOT NULL PRIMARY KEY,+ name TEXT NOT NULL DEFAULT '',+ workspace TEXT NOT NULL DEFAULT '',+ icon_url TEXT NOT NULL DEFAULT '',+ openai_key TEXT NOT NULL DEFAULT '',+ token TEXT NOT NULL DEFAULT '',+ email TEXT NOT NULL DEFAULT ''+);diff --git a/frontend/rust-lib/flowy-sqlite/src/schema.rs b/frontend/rust-lib/flowy-sqlite/src/schema.rsindex 5b70cf9164..e8b9d2b9bb 100644--- a/frontend/rust-lib/flowy-sqlite/src/schema.rs+++ b/frontend/rust-lib/flowy-sqlite/src/schema.rs@@ -1,209 +1,13 @@// @generated automatically by Diesel CLI.-diesel::table! {- app_table (id) {- id -> Text,- workspace_id -> Text,- name -> Text,- desc -> Text,- color_style -> Binary,- last_view_id -> Nullable<Text>,- modified_time -> BigInt,- create_time -> BigInt,- version -> BigInt,- is_trash -> Bool,- }-}--diesel::table! {- database_refs (ref_id) {- ref_id -> Text,- name -> Text,- is_base -> Bool,- view_id -> Text,- database_id -> Text,- }-}--diesel::table! {- document_rev_snapshot (snapshot_id) {- snapshot_id -> Text,- object_id -> Text,- rev_id -> BigInt,- base_rev_id -> BigInt,- timestamp -> BigInt,- data -> Binary,- }-}--diesel::table! {- document_rev_table (id) {- id -> Integer,- document_id -> Text,- base_rev_id -> BigInt,- rev_id -> BigInt,- data -> Binary,- state -> Integer,- }-}--diesel::table! {- folder_rev_snapshot (snapshot_id) {- snapshot_id -> Text,- object_id -> Text,- rev_id -> BigInt,- base_rev_id -> BigInt,- timestamp -> BigInt,- data -> Binary,- }-}--diesel::table! {- grid_block_index_table (row_id) {- row_id -> Text,- block_id -> Text,- }-}--diesel::table! {- grid_meta_rev_table (id) {- id -> Integer,- object_id -> Text,- base_rev_id -> BigInt,- rev_id -> BigInt,- data -> Binary,- state -> Integer,- }-}--diesel::table! {- grid_rev_snapshot (snapshot_id) {- snapshot_id -> Text,- object_id -> Text,- rev_id -> BigInt,- base_rev_id -> BigInt,- timestamp -> BigInt,- data -> Binary,- }-}--diesel::table! {- grid_rev_table (id) {- id -> Integer,- object_id -> Text,- base_rev_id -> BigInt,- rev_id -> BigInt,- data -> Binary,- state -> Integer,- }-}--diesel::table! {- grid_view_rev_table (id) {- id -> Integer,- object_id -> Text,- base_rev_id -> BigInt,- rev_id -> BigInt,- data -> Binary,- state -> Integer,- }-}--diesel::table! {- kv_table (key) {- key -> Text,- value -> Binary,- }-}--diesel::table! {- rev_snapshot (id) {- id -> Integer,- object_id -> Text,- rev_id -> BigInt,- data -> Binary,- }-}--diesel::table! {- rev_table (id) {- id -> Integer,- doc_id -> Text,- base_rev_id -> BigInt,- rev_id -> BigInt,- data -> Binary,- state -> Integer,- ty -> Integer,- }-}--diesel::table! {- trash_table (id) {- id -> Text,- name -> Text,- desc -> Text,- modified_time -> BigInt,- create_time -> BigInt,- ty -> Integer,- }-}-diesel::table! {user_table (id) {id -> Text,name -> Text,- token -> Text,- email -> Text,workspace -> Text,icon_url -> Text,openai_key -> Text,+ token -> Text,+ email -> Text,}}--diesel::table! {- view_table (id) {- id -> Text,- belong_to_id -> Text,- name -> Text,- desc -> Text,- modified_time -> BigInt,- create_time -> BigInt,- thumbnail -> Text,- view_type -> Integer,- version -> BigInt,- is_trash -> Bool,- ext_data -> Text,- }-}--diesel::table! {- workspace_table (id) {- id -> Text,- name -> Text,- desc -> Text,- modified_time -> BigInt,- create_time -> BigInt,- user_id -> Text,- version -> BigInt,- }-}--diesel::allow_tables_to_appear_in_same_query!(- app_table,- database_refs,- document_rev_snapshot,- document_rev_table,- folder_rev_snapshot,- grid_block_index_table,- grid_meta_rev_table,- grid_rev_snapshot,- grid_rev_table,- grid_view_rev_table,- kv_table,- rev_snapshot,- rev_table,- trash_table,- user_table,- view_table,- workspace_table,-);diff --git a/frontend/rust-lib/flowy-user/src/services/database.rs b/frontend/rust-lib/flowy-user/src/services/database.rsindex 98bc6fde47..23c2042e69 100644--- a/frontend/rust-lib/flowy-user/src/services/database.rs+++ b/frontend/rust-lib/flowy-user/src/services/database.rs@@ -105,16 +105,18 @@ lazy_static! {static ref COLLAB_DB_MAP: RwLock<HashMap<i64, Arc<RocksCollabDB>>> = RwLock::new(HashMap::new());}+/// The order of the fields in the struct must be the same as the order of the fields in the table.+/// Check out the [schema.rs] for table schema.#[derive(Clone, Default, Queryable, Identifiable, Insertable)]#[table_name = "user_table"]pub struct UserTable {pub(crate) id: String,pub(crate) name: String,- pub(crate) token: String,- pub(crate) email: String,pub(crate) workspace: String,pub(crate) icon_url: String,pub(crate) openai_key: String,+ pub(crate) token: String,+ pub(crate) email: String,}impl UserTable {