chore: add grid_view_table

This commit is contained in:
appflowy 2022-08-15 10:08:05 +08:00
parent 1ccdbaff9a
commit b15439fb70
4 changed files with 27 additions and 1 deletions

View File

@ -0,0 +1,2 @@
-- This file should undo anything in `up.sql`
DROP TABLE grid_view_table;

View File

@ -0,0 +1,11 @@
-- Your SQL goes here
CREATE TABLE grid_view_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
);

View File

@ -42,6 +42,17 @@ table! {
}
}
table! {
grid_view_table (id) {
id -> Integer,
object_id -> Text,
base_rev_id -> BigInt,
rev_id -> BigInt,
data -> Binary,
state -> Integer,
}
}
table! {
kv_table (key) {
key -> Text,
@ -125,6 +136,7 @@ allow_tables_to_appear_in_same_query!(
grid_block_index_table,
grid_meta_rev_table,
grid_rev_table,
grid_view_table,
kv_table,
rev_snapshot,
rev_table,

View File

@ -7,6 +7,7 @@ use crate::services::cell::{apply_cell_data_changeset, decode_any_cell_data, Cel
use crate::services::field::{default_type_option_builder_from_type, type_option_builder_from_bytes, FieldBuilder};
use crate::services::filter::{GridFilterChangeset, GridFilterService};
use crate::services::grid_view_editor::GridViewRevisionEditor;
use crate::services::group::GridGroupService;
use crate::services::persistence::block_index::BlockIndexCache;
use crate::services::row::{
@ -32,7 +33,7 @@ pub struct GridRevisionEditor {
pub(crate) grid_id: String,
user: Arc<dyn GridUser>,
grid_pad: Arc<RwLock<GridRevisionPad>>,
// view_editor: Arc<GridViewRevisionEditor>,
view_editor: Arc<GridViewRevisionEditor>,
rev_manager: Arc<RevisionManager>,
block_manager: Arc<GridBlockManager>,