mirror of
https://github.com/Dictionarry-Hub/schema.git
synced 2026-05-03 06:14:17 +02:00
feat: add quality profile testing tables for enhanced testing capabilities
This commit is contained in:
+7
-1
@@ -48,4 +48,10 @@ All schema changes will be documented in this file.
|
||||
- Supports movie/series type differentiation for parser context
|
||||
- Unique constraint on (custom_format_id, title, type) prevents duplicate tests
|
||||
- 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
|
||||
@@ -398,6 +398,39 @@ CREATE TABLE delay_profile_tags (
|
||||
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
|
||||
-- ============================================================================
|
||||
|
||||
Reference in New Issue
Block a user