feat(files): implement file storage functionality with save, load, and list operations

This commit is contained in:
2026-03-30 22:24:18 +02:00
parent 79d8219836
commit 7f2b2b9fee
12 changed files with 676 additions and 33 deletions

View File

@@ -92,5 +92,13 @@ func (db *DB) VerifyRequirements(ctx context.Context) error {
return fmt.Errorf("embeddings table is missing — run migrations")
}
var hasStoredFiles bool
if err := db.pool.QueryRow(ctx, `select exists(select 1 from pg_tables where schemaname = 'public' and tablename = 'stored_files')`).Scan(&hasStoredFiles); err != nil {
return fmt.Errorf("verify stored_files table: %w", err)
}
if !hasStoredFiles {
return fmt.Errorf("stored_files table is missing — run migrations")
}
return nil
}