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 (
|
||||
event_id INTEGER PRIMARY KEY AUTOINCREMENT CHECK(event_id <= 9007199254740991), -- JavaScript’s Number.MAX_SAFE_INTEGER
|
||||
request_id TEXT NOT NULL UNIQUE,
|
||||
request_fingerprint BLOB NOT NULL,
|
||||
event_json TEXT NOT NULL
|
||||
request_fingerprint BLOB NOT NULL
|
||||
);
|
||||
|
||||
CREATE TABLE documents (
|
||||
|
|
|
|||
|
|
@ -10,14 +10,14 @@ impl Database {
|
|||
request_id: uuid::Uuid,
|
||||
fingerprint: &[u8],
|
||||
) -> Result<VaultUpdateId> {
|
||||
Ok(sqlx::query(
|
||||
"INSERT INTO events(request_id, request_fingerprint, event_json) VALUES (?, ?, '')",
|
||||
Ok(
|
||||
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(
|
||||
|
|
|
|||
Loading…
Reference in a new issue