docs: update documentation for media scanner naming
- Update development.md with new file names (scanner.go, media_scanner.go) - Update API reference: "Book/ebook operations" -> "Media item operations" - Remove historical migration comments from schema: - Simplify media_items table comment - Remove backward compatibility comments for reading_progress and media_ratings - Remove note about backward compatibility views - Remove historical comment from queries.sql about ebook folders
This commit is contained in:
@@ -74,7 +74,7 @@ CREATE TABLE library_visibility (
|
|||||||
UNIQUE(user_id, library_id)
|
UNIQUE(user_id, library_id)
|
||||||
);
|
);
|
||||||
|
|
||||||
-- Create media_items table (replaces ebooks table for broader media support)
|
-- Create media_items table
|
||||||
CREATE TABLE media_items (
|
CREATE TABLE media_items (
|
||||||
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
||||||
library_id UUID NOT NULL REFERENCES libraries(id) ON DELETE CASCADE,
|
library_id UUID NOT NULL REFERENCES libraries(id) ON DELETE CASCADE,
|
||||||
@@ -161,8 +161,7 @@ CREATE TABLE reading_progress (
|
|||||||
conflict_resolved BOOLEAN DEFAULT TRUE
|
conflict_resolved BOOLEAN DEFAULT TRUE
|
||||||
);
|
);
|
||||||
|
|
||||||
-- Create reading_progress view for backward compatibility
|
-- Create media_ratings table
|
||||||
-- Create media_ratings table (replaces ebook_ratings)
|
|
||||||
CREATE TABLE media_ratings (
|
CREATE TABLE media_ratings (
|
||||||
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
||||||
media_item_id UUID NOT NULL REFERENCES media_items(id) ON DELETE CASCADE,
|
media_item_id UUID NOT NULL REFERENCES media_items(id) ON DELETE CASCADE,
|
||||||
@@ -460,7 +459,6 @@ COMMENT ON COLUMN media_items.google_books_id IS 'Google Books identifier for in
|
|||||||
-- - Library visibility is controlled through library_visibility table - admins can hide/show libraries per user
|
-- - Library visibility is controlled through library_visibility table - admins can hide/show libraries per user
|
||||||
-- - Notes and highlights support position data (page:offset or CFI format) for precise location tracking
|
-- - Notes and highlights support position data (page:offset or CFI format) for precise location tracking
|
||||||
-- - Highlights can have associated notes for detailed annotations
|
-- - Highlights can have associated notes for detailed annotations
|
||||||
-- NOTE: All backward compatibility views (ebooks, ebook_ratings, ebook_reading_progress, ebook_notes, ebook_highlights) have been removed
|
|
||||||
|
|
||||||
-- ============================================
|
-- ============================================
|
||||||
-- PERFORMANCE OPTIMIZATION (Phase 7)
|
-- PERFORMANCE OPTIMIZATION (Phase 7)
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ bookhoard/
|
|||||||
**Handlers** (`internal/handlers/`):
|
**Handlers** (`internal/handlers/`):
|
||||||
- `auth.go` - Authentication & user management
|
- `auth.go` - Authentication & user management
|
||||||
- `library.go` - Library CRUD operations
|
- `library.go` - Library CRUD operations
|
||||||
- `ebook.go` - Media item operations
|
- `scanner.go` - Media scanning operations
|
||||||
- `media.go` - Media downloads, shelves
|
- `media.go` - Media downloads, shelves
|
||||||
- `koreader.go` - KOReader sync protocol
|
- `koreader.go` - KOReader sync protocol
|
||||||
- `kobo.go` - Kobo sync protocol
|
- `kobo.go` - Kobo sync protocol
|
||||||
@@ -63,7 +63,7 @@ bookhoard/
|
|||||||
|
|
||||||
**Services** (`internal/services/`):
|
**Services** (`internal/services/`):
|
||||||
- `library_service.go` - Library operations
|
- `library_service.go` - Library operations
|
||||||
- `ebook_scanner.go` - File scanning & metadata extraction
|
- `media_scanner.go` - File scanning & metadata extraction
|
||||||
- `worker.go` - Job queue worker pool
|
- `worker.go` - Job queue worker pool
|
||||||
- `scheduler.go` - Scheduled task manager
|
- `scheduler.go` - Scheduled task manager
|
||||||
- `collection_service.go` - Collection rules processing
|
- `collection_service.go` - Collection rules processing
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ Complete reference for Bookhoard REST API endpoints.
|
|||||||
- [Admin](admin/) - Admin operations (user management)
|
- [Admin](admin/) - Admin operations (user management)
|
||||||
- [Libraries](libraries/) - Library management
|
- [Libraries](libraries/) - Library management
|
||||||
- [Books](books/) - Bulk book operations and downloads
|
- [Books](books/) - Bulk book operations and downloads
|
||||||
- [Media Items](media-items/) - Book/ebook operations
|
- [Media Items](media-items/) - Media item operations
|
||||||
- [Progress](progress/) - Reading progress tracking
|
- [Progress](progress/) - Reading progress tracking
|
||||||
- [Notes](notes/) - User notes management
|
- [Notes](notes/) - User notes management
|
||||||
- [Highlights](highlights/) - Book highlights
|
- [Highlights](highlights/) - Book highlights
|
||||||
|
|||||||
@@ -351,9 +351,6 @@ RETURNING *;
|
|||||||
-- name: DeleteMediaRating :exec
|
-- name: DeleteMediaRating :exec
|
||||||
DELETE FROM media_ratings WHERE media_item_id = $1 AND user_id = $2;
|
DELETE FROM media_ratings WHERE media_item_id = $1 AND user_id = $2;
|
||||||
|
|
||||||
-- Note: User ebook folders replaced by library folders system
|
|
||||||
-- Legacy folder management is now handled through libraries
|
|
||||||
|
|
||||||
-- Search Media Items queries
|
-- Search Media Items queries
|
||||||
-- name: SearchMediaItems :many
|
-- name: SearchMediaItems :many
|
||||||
SELECT mi.*, l.name as library_name, lt.name as library_type_name
|
SELECT mi.*, l.name as library_name, lt.name as library_type_name
|
||||||
|
|||||||
Reference in New Issue
Block a user