Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add db ERD to docs. #24

Merged
merged 1 commit into from
Nov 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/_sidebar.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@
* [SPIKE Nexus Automatic Recovery](architecture/charts/recovery.md)
* [SPIKE Manual System Re-Init](architecture/charts/re-init.md)
* [SPIKE Forced Reset](architecture/charts/reset.md)
* [SPIKE Nexus Backing Store](architecture/charts/database.md)
3 changes: 2 additions & 1 deletion docs/architecture/charts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@
* [SPIKE Nexus Root Key Provisioning](architecture/charts/day-zero.md)
* [SPIKE Nexus Automatic Recovery](architecture/charts/recovery.md)
* [SPIKE Manual System Re-Init](architecture/charts/re-init.md)
* [SPIKE Forced Reset](architecture/charts/reset.md)
* [SPIKE Forced Reset](architecture/charts/reset.md)
* [SPIKE Nexus Backing Store](architecture/charts/database.md)
32 changes: 32 additions & 0 deletions docs/architecture/charts/database.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
## SPIKE Nexus Backing Store

Here is the Entity-Relationship Diagram (ERD) for the SPIKE Nexus backing
store:

```mermaid
erDiagram
admin_token {
integer id PK "CHECK (id = 1)"
blob nonce "NOT NULL"
blob encrypted_token "NOT NULL"
datetime updated_at "NOT NULL DEFAULT CURRENT_TIMESTAMP"
}

secrets {
text path PK "NOT NULL"
integer version PK "NOT NULL"
blob nonce "NOT NULL"
blob encrypted_data "NOT NULL"
datetime created_time "NOT NULL"
datetime deleted_time "nullable"
}

secret_metadata {
text path PK
integer current_version "NOT NULL"
datetime created_time "NOT NULL"
datetime updated_time "NOT NULL"
}

secrets ||--o| secret_metadata : "references"
```
File renamed without changes.