AppFlowy/frontend/rust-lib/flowy-database/src/schema.rs

135 lines
2.4 KiB
Rust
Raw Normal View History

2021-07-13 09:19:39 +00:00
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,
2021-07-13 09:19:39 +00:00
}
}
2022-04-05 06:25:07 +00:00
table! {
grid_block_index_table (row_id) {
row_id -> Text,
block_id -> Text,
}
}
2022-03-11 13:36:00 +00:00
table! {
grid_meta_rev_table (id) {
id -> Integer,
object_id -> Text,
base_rev_id -> BigInt,
rev_id -> BigInt,
data -> Binary,
state -> Integer,
}
}
2022-03-10 14:27:19 +00:00
table! {
grid_rev_table (id) {
id -> Integer,
object_id -> Text,
base_rev_id -> BigInt,
rev_id -> BigInt,
data -> Binary,
state -> Integer,
}
}
2022-03-04 13:26:32 +00:00
table! {
kv_table (key) {
key -> Text,
value -> Binary,
}
}
2022-06-10 14:27:19 +00:00
table! {
rev_snapshot (id) {
id -> Integer,
object_id -> Text,
rev_id -> BigInt,
data -> Binary,
}
}
2021-09-23 05:15:35 +00:00
table! {
rev_table (id) {
id -> Integer,
doc_id -> Text,
2021-09-23 07:49:10 +00:00
base_rev_id -> BigInt,
rev_id -> BigInt,
2021-09-23 05:15:35 +00:00
data -> Binary,
state -> Integer,
2021-09-26 08:39:57 +00:00
ty -> Integer,
2021-09-23 05:15:35 +00:00
}
}
2021-10-12 14:31:38 +00:00
table! {
trash_table (id) {
id -> Text,
name -> Text,
desc -> Text,
modified_time -> BigInt,
create_time -> BigInt,
ty -> Integer,
2021-10-12 14:31:38 +00:00
}
}
table! {
user_table (id) {
id -> Text,
name -> Text,
2021-08-31 09:25:08 +00:00
token -> Text,
email -> Text,
workspace -> Text,
}
}
2021-07-13 09:19:39 +00:00
table! {
view_table (id) {
id -> Text,
2021-07-28 05:41:39 +00:00
belong_to_id -> Text,
2021-07-13 09:19:39 +00:00
name -> Text,
desc -> Text,
modified_time -> BigInt,
create_time -> BigInt,
thumbnail -> Text,
view_type -> Integer,
version -> BigInt,
is_trash -> Bool,
2022-06-11 09:13:52 +00:00
ext_data -> Text,
2021-07-13 09:19:39 +00:00
}
}
table! {
workspace_table (id) {
id -> Text,
name -> Text,
desc -> Text,
modified_time -> BigInt,
create_time -> BigInt,
user_id -> Text,
version -> BigInt,
}
}
2021-10-12 14:31:38 +00:00
allow_tables_to_appear_in_same_query!(
app_table,
2022-04-05 06:25:07 +00:00
grid_block_index_table,
2022-03-11 13:36:00 +00:00
grid_meta_rev_table,
2022-03-10 14:27:19 +00:00
grid_rev_table,
2022-03-04 13:26:32 +00:00
kv_table,
2022-06-10 14:27:19 +00:00
rev_snapshot,
2021-10-12 14:31:38 +00:00
rev_table,
trash_table,
user_table,
view_table,
workspace_table,
);