Merged in docs/config-docs (pull request #45)

Update docs for config

* update docs


Approved-by: Michael McGuinness
This commit is contained in:
Jay Brown
2025-02-04 18:18:10 +00:00
parent 84abc3a813
commit 9254b91d45
2 changed files with 90 additions and 0 deletions
-101
View File
@@ -1,101 +0,0 @@
# Database schema
To view this diagrem live in vscode use the https://marketplace.visualstudio.com/items?itemName=bierner.markdown-mermaid extension.
You can also edit live with https://mermaid.live
This diagram should be updated manually when there are changes to the database schema.
To generate the diagram directly use the following command:
```bash
docker run --rm -v $(pwd):/data minlag/mermaid-cli -i /data/diagram.mmd -o /data/output.png -w 1024 -H 768
```
```mermaid
erDiagram
clients ||--o{ jobs : has
jobs ||--o{ documents : has
jobs ||--|| collectors : has
documents ||--o{ results : has
queries ||--o{ results : has
queries ||--o{ requiredQueries : has
queries ||--o{ queryConfigs : has
collectors ||--o{ collectorQueries : has
collectors ||--o{ collectorCodeVersions : has
queries ||--o{ collectorQueries : references
clients {
uuid id PK
text name UK
boolean canSync
}
jobs {
uuid id PK
uuid clientId FK
boolean canSync
}
documents {
uuid id PK
uuid jobId FK
}
collectors {
uuid id PK
uuid jobId FK
int latestVersion
int activeVersion
}
collectorCodeVersions {
uuid id PK
uuid collectorId FK
int minCleanVersion
int minTextVersion
int addedVersion
int removedVersion
}
queries {
uuid id PK
int latestVersion
int activeVersion
queryType type
}
requiredQueries {
uuid id PK
uuid queryId FK
uuid requiredQueryId FK
int addedVersion
int removedVersion
}
queryConfigs {
uuid id PK
uuid queryId FK
jsonb config
int addedVersion
int removedVersion
}
collectorQueries {
uuid id PK
uuid collectorId FK
varchar name
uuid queryId FK
int addedVersion
int removedVersion
}
results {
uuid id PK
uuid queryId FK
uuid documentId FK
text value
int cleanVersion
int textVersion
int queryVersion
}
```