mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-05 03:19:52 +08:00
feat(server): add soft deleted flag to optimized blob table (#5058)
requires https://github.com/toeverything/OctoBase/pull/561
This commit is contained in:
Generated
+5
-5
@@ -1112,7 +1112,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "jwst-codec"
|
name = "jwst-codec"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/toeverything/OctoBase.git?rev=aad9e5b#aad9e5b7e9d6f479e6cf7555f5845bbbaaadbc66"
|
source = "git+https://github.com/toeverything/OctoBase.git?rev=49a6b7a#49a6b7af25ce1fe54e8383e10980e9536821d286"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"arbitrary",
|
"arbitrary",
|
||||||
"bitvec",
|
"bitvec",
|
||||||
@@ -1133,7 +1133,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "jwst-core"
|
name = "jwst-core"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/toeverything/OctoBase.git?rev=aad9e5b#aad9e5b7e9d6f479e6cf7555f5845bbbaaadbc66"
|
source = "git+https://github.com/toeverything/OctoBase.git?rev=49a6b7a#49a6b7af25ce1fe54e8383e10980e9536821d286"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-trait",
|
"async-trait",
|
||||||
"base64",
|
"base64",
|
||||||
@@ -1151,7 +1151,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "jwst-logger"
|
name = "jwst-logger"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/toeverything/OctoBase.git?rev=aad9e5b#aad9e5b7e9d6f479e6cf7555f5845bbbaaadbc66"
|
source = "git+https://github.com/toeverything/OctoBase.git?rev=49a6b7a#49a6b7af25ce1fe54e8383e10980e9536821d286"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"chrono",
|
"chrono",
|
||||||
"nu-ansi-term 0.49.0",
|
"nu-ansi-term 0.49.0",
|
||||||
@@ -1164,7 +1164,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "jwst-storage"
|
name = "jwst-storage"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/toeverything/OctoBase.git?rev=aad9e5b#aad9e5b7e9d6f479e6cf7555f5845bbbaaadbc66"
|
source = "git+https://github.com/toeverything/OctoBase.git?rev=49a6b7a#49a6b7af25ce1fe54e8383e10980e9536821d286"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"async-trait",
|
"async-trait",
|
||||||
@@ -1189,7 +1189,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "jwst-storage-migration"
|
name = "jwst-storage-migration"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/toeverything/OctoBase.git?rev=aad9e5b#aad9e5b7e9d6f479e6cf7555f5845bbbaaadbc66"
|
source = "git+https://github.com/toeverything/OctoBase.git?rev=49a6b7a#49a6b7af25ce1fe54e8383e10980e9536821d286"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"sea-orm-migration",
|
"sea-orm-migration",
|
||||||
"tokio",
|
"tokio",
|
||||||
|
|||||||
@@ -0,0 +1,2 @@
|
|||||||
|
-- AlterTable
|
||||||
|
ALTER TABLE "optimized_blobs" ADD COLUMN "deleted_at" TIMESTAMPTZ(6);
|
||||||
@@ -178,13 +178,15 @@ model Blob {
|
|||||||
}
|
}
|
||||||
|
|
||||||
model OptimizedBlob {
|
model OptimizedBlob {
|
||||||
id Int @id @default(autoincrement()) @db.Integer
|
id Int @id @default(autoincrement()) @db.Integer
|
||||||
hash String @db.VarChar
|
hash String @db.VarChar
|
||||||
workspaceId String @map("workspace_id") @db.VarChar
|
workspaceId String @map("workspace_id") @db.VarChar
|
||||||
params String @db.VarChar
|
params String @db.VarChar
|
||||||
blob Bytes @db.ByteA
|
blob Bytes @db.ByteA
|
||||||
length BigInt
|
length BigInt
|
||||||
createdAt DateTime @default(now()) @map("created_at") @db.Timestamptz(6)
|
createdAt DateTime @default(now()) @map("created_at") @db.Timestamptz(6)
|
||||||
|
// not for keeping, but for snapshot history
|
||||||
|
deletedAt DateTime? @map("deleted_at") @db.Timestamptz(6)
|
||||||
|
|
||||||
@@unique([workspaceId, hash, params])
|
@@unique([workspaceId, hash, params])
|
||||||
@@map("optimized_blobs")
|
@@map("optimized_blobs")
|
||||||
|
|||||||
@@ -8,9 +8,9 @@ crate-type = ["cdylib"]
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
chrono = "0.4"
|
chrono = "0.4"
|
||||||
jwst-codec = { git = "https://github.com/toeverything/OctoBase.git", rev = "aad9e5b" }
|
jwst-codec = { git = "https://github.com/toeverything/OctoBase.git", rev = "49a6b7a" }
|
||||||
jwst-core = { git = "https://github.com/toeverything/OctoBase.git", rev = "aad9e5b" }
|
jwst-core = { git = "https://github.com/toeverything/OctoBase.git", rev = "49a6b7a" }
|
||||||
jwst-storage = { git = "https://github.com/toeverything/OctoBase.git", rev = "aad9e5b" }
|
jwst-storage = { git = "https://github.com/toeverything/OctoBase.git", rev = "49a6b7a" }
|
||||||
napi = { version = "2", default-features = false, features = [
|
napi = { version = "2", default-features = false, features = [
|
||||||
"napi5",
|
"napi5",
|
||||||
"async",
|
"async",
|
||||||
|
|||||||
Reference in New Issue
Block a user