docs: update documentation to OKF v0.1 format

This commit is contained in:
OpenVelo Agent
2026-07-22 16:45:58 +00:00
parent c0a01eb58e
commit b02369dd41
5 changed files with 135 additions and 13 deletions
+10 -5
View File
@@ -3,7 +3,7 @@ type: database
title: Database Schema Overview
description: SQLite (better-sqlite3) schema for HIPCTF: tables, relationships, indexes, and WAL journal mode.
tags: [database, sqlite, typeorm, schema]
timestamp: 2026-07-22T14:50:25Z
timestamp: 2026-07-22T16:44:54Z
---
# Overview
@@ -19,10 +19,15 @@ by a second migration
(`backend/src/database/migrations/1700000000100-SeedSystemData.ts`).
The initial migration declares every column used by the entities
(including `category.created_at` and `category.updated_at`), so the
later `AddCategoryTimestampsAndUniqueAbbrev1700000000200` and
`UpdateSystemCategoryKeys1700000000300` migrations only patch legacy
databases that pre-date those columns and reseed the canonical system
rows.
later `AddCategoryTimestampsAndUniqueAbbrev1700000000200`,
`UpdateSystemCategoryKeys1700000000300`, and
`RepairCategorySchemaAndSystemCategories1700000000400` migrations only
patch legacy databases that pre-date those columns and reseed the
canonical system rows. The `...0400` migration is idempotent and
forward-only: it adds `created_at`/`updated_at` to legacy six-column
`category` tables, deletes obsolete `FOR`/`OSI` system rows, rewrites
metadata on canonical rows, inserts any missing canonical row, and
re-asserts the unique indexes on `system_key` and `abbreviation`.
# Tables