db: update SQL queries and regenerate models for comic metadata
Phase 1 implementation: Update CreateMediaItem query to support 14 new comic metadata fields. Changes: - Add 14 new columns to CreateMediaItem INSERT statement - Regenerate sqlc models with new fields - CommunityRating now maps to pgtype.Float8 (was pgtype.Numeric) - All new comic and universal metadata fields included New fields supported: - Reading direction: manga_type, reading_direction - Universal: series_count, volume, imprint, age_rating, web_url - Comic-specific: story_arc, is_black_and_white, metadata_notes, community_rating, alternate_info, scan_information, summary Generated models verified: - MediaItems struct includes all 14 new fields - CreateMediaItemParams has correct parameter count (42 total) - CommunityRating is pgtype.Float8 (not pgtype.Numeric) Relates to: Phase 4.1-4.2 database layer implementation
This commit is contained in:
@@ -128,8 +128,8 @@ ORDER BY l.created_at ASC;
|
||||
|
||||
-- Media Items queries
|
||||
-- name: CreateMediaItem :one
|
||||
INSERT INTO media_items (library_id, title, author, isbn, description, file_path, file_size, mime_type, cover_image_path, series, series_number, tags, tags_search, asin, date_published, publisher, contributors, contributors_search, language, edition, page_count, genre, copyright_year, goodreads_id, openlibrary_id, google_books_id, added_by_admin_id, created_at)
|
||||
VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28)
|
||||
INSERT INTO media_items (library_id, title, author, isbn, description, file_path, file_size, mime_type, cover_image_path, series, series_number, tags, tags_search, asin, date_published, publisher, contributors, contributors_search, language, edition, page_count, genre, copyright_year, goodreads_id, openlibrary_id, google_books_id, added_by_admin_id, created_at, manga_type, reading_direction, series_count, volume, imprint, age_rating, web_url, story_arc, is_black_and_white, metadata_notes, community_rating, alternate_info, scan_information, summary)
|
||||
VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40, $41, $42)
|
||||
RETURNING *;
|
||||
|
||||
-- name: GetMediaItem :one
|
||||
|
||||
Reference in New Issue
Block a user