Fully remove events json
This commit is contained in:
parent
260d32795a
commit
fb778b69d5
2 changed files with 8 additions and 9 deletions
|
|
@ -1,8 +1,7 @@
|
||||||
CREATE TABLE events (
|
CREATE TABLE events (
|
||||||
event_id INTEGER PRIMARY KEY AUTOINCREMENT CHECK(event_id <= 9007199254740991), -- JavaScript’s Number.MAX_SAFE_INTEGER
|
event_id INTEGER PRIMARY KEY AUTOINCREMENT CHECK(event_id <= 9007199254740991), -- JavaScript’s Number.MAX_SAFE_INTEGER
|
||||||
request_id TEXT NOT NULL UNIQUE,
|
request_id TEXT NOT NULL UNIQUE,
|
||||||
request_fingerprint BLOB NOT NULL,
|
request_fingerprint BLOB NOT NULL
|
||||||
event_json TEXT NOT NULL
|
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE documents (
|
CREATE TABLE documents (
|
||||||
|
|
|
||||||
|
|
@ -10,14 +10,14 @@ impl Database {
|
||||||
request_id: uuid::Uuid,
|
request_id: uuid::Uuid,
|
||||||
fingerprint: &[u8],
|
fingerprint: &[u8],
|
||||||
) -> Result<VaultUpdateId> {
|
) -> Result<VaultUpdateId> {
|
||||||
Ok(sqlx::query(
|
Ok(
|
||||||
"INSERT INTO events(request_id, request_fingerprint, event_json) VALUES (?, ?, '')",
|
sqlx::query("INSERT INTO events(request_id, request_fingerprint) VALUES (?, ?)")
|
||||||
|
.bind(request_id.to_string())
|
||||||
|
.bind(fingerprint)
|
||||||
|
.execute(&mut **tx)
|
||||||
|
.await?
|
||||||
|
.last_insert_rowid(),
|
||||||
)
|
)
|
||||||
.bind(request_id.to_string())
|
|
||||||
.bind(fingerprint)
|
|
||||||
.execute(&mut **tx)
|
|
||||||
.await?
|
|
||||||
.last_insert_rowid())
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub async fn insert_document_version(
|
pub async fn insert_document_version(
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue