feat: add quality profile testing tables for enhanced testing capabilities

This commit is contained in:
Sam Chau
2026-01-03 05:50:34 +10:30
parent b3b29d3fe9
commit 0883470f17
2 changed files with 40 additions and 1 deletions
+7 -1
View File
@@ -48,4 +48,10 @@ All schema changes will be documented in this file.
- Supports movie/series type differentiation for parser context - Supports movie/series type differentiation for parser context
- Unique constraint on (custom_format_id, title, type) prevents duplicate tests - Unique constraint on (custom_format_id, title, type) prevents duplicate tests
- Add include_in_rename column to custom_formats table - Add include_in_rename column to custom_formats table
- Controls whether custom format name appears in renamed filenames - Controls whether custom format name appears in renamed filenames
## 3-1-26
- Add quality profile testing tables
- test_entities: stores movies/series from TMDB for testing quality profiles
- test_releases: stores sample releases attached to test entities
- Supports languages, indexers, and flags as JSON arrays for release metadata
+33
View File
@@ -398,6 +398,39 @@ CREATE TABLE delay_profile_tags (
FOREIGN KEY (tag_id) REFERENCES tags(id) ON DELETE CASCADE FOREIGN KEY (tag_id) REFERENCES tags(id) ON DELETE CASCADE
); );
-- ============================================================================
-- QUALITY PROFILE TESTING
-- ============================================================================
-- Test entities (movies/series for quality profile testing)
CREATE TABLE test_entities (
id INTEGER PRIMARY KEY AUTOINCREMENT,
type TEXT NOT NULL CHECK (type IN ('movie', 'series')),
tmdb_id INTEGER NOT NULL,
title TEXT NOT NULL,
year INTEGER,
poster_path TEXT,
created_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP,
updated_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP,
UNIQUE(type, tmdb_id)
);
-- Test releases attached to entities
CREATE TABLE test_releases (
id INTEGER PRIMARY KEY AUTOINCREMENT,
test_entity_id INTEGER NOT NULL,
title TEXT NOT NULL,
size_bytes INTEGER,
languages TEXT NOT NULL DEFAULT '[]',
indexers TEXT NOT NULL DEFAULT '[]',
flags TEXT NOT NULL DEFAULT '[]',
created_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP,
updated_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (test_entity_id) REFERENCES test_entities(id) ON DELETE CASCADE
);
CREATE INDEX idx_test_releases_entity ON test_releases(test_entity_id);
-- ============================================================================ -- ============================================================================
-- INDEXES AND CONSTRAINTS -- INDEXES AND CONSTRAINTS
-- ============================================================================ -- ============================================================================