Files
2026-10-01 11:00:00 +02:00

14 lines
466 B
SQL

-- file: crates/knowledge-store-postgres-lib/migrations/V1__initial_sources.sql
-- version: 1
CREATE TABLE knowledge_sources (
source_id TEXT PRIMARY KEY,
family TEXT NOT NULL CHECK (family IN ('pgr', 'howto', 'snippet', 'project_local')),
git_reference TEXT NOT NULL
);
CREATE TABLE knowledge_source_sync_state (
source_id TEXT PRIMARY KEY REFERENCES knowledge_sources(source_id) ON DELETE CASCADE,
last_synchronized_revision TEXT NOT NULL
);