chore: recreate snapshot table & remove old data (#4322)

* chore: recreate snapshot table & remove old data

* chore: disable test

* chore: fmt
This commit is contained in:
Nathan.fooo
2024-01-07 13:59:39 +08:00
committed by GitHub
parent 76416cfdba
commit ba482a30a3
19 changed files with 111 additions and 154 deletions

View File

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

View File

@ -0,0 +1,15 @@
-- Your SQL goes here
-- Drop the table if it exists
DROP TABLE IF EXISTS rocksdb_backup;
DROP TABLE IF EXISTS collab_snapshot;
-- Recreate the table
CREATE TABLE collab_snapshot (
id TEXT NOT NULL PRIMARY KEY DEFAULT '',
object_id TEXT NOT NULL DEFAULT '',
title TEXT NOT NULL DEFAULT '',
desc TEXT NOT NULL DEFAULT '',
collab_type TEXT NOT NULL DEFAULT '',
timestamp BIGINT NOT NULL DEFAULT 0,
data BLOB NOT NULL DEFAULT (x'')
);

View File

@ -12,14 +12,6 @@ diesel::table! {
}
}
diesel::table! {
rocksdb_backup (object_id) {
object_id -> Text,
timestamp -> BigInt,
data -> Binary,
}
}
diesel::table! {
user_data_migration_records (id) {
id -> Integer,
@ -56,7 +48,6 @@ diesel::table! {
diesel::allow_tables_to_appear_in_same_query!(
collab_snapshot,
rocksdb_backup,
user_data_migration_records,
user_table,
user_workspace_table,