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
+33
View File
@@ -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
-- ============================================================================