feat(files): implement file storage functionality with save, load, and list operations
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user