mirror of
https://github.com/Dictionarry-Hub/schema.git
synced 2026-05-03 06:14:17 +02:00
feat: add custom format testing table for validating format matching
This commit is contained in:
@@ -40,3 +40,11 @@ All schema changes will be documented in this file.
|
||||
- delay_profiles: protocol preference, delays, bypass conditions
|
||||
- delay_profile_tags: junction table for tag associations
|
||||
- CHECK constraints for protocol/delay validation
|
||||
|
||||
## 31-12-25
|
||||
|
||||
- Add custom format testing table
|
||||
- custom_format_tests: stores test cases for validating custom format matching
|
||||
- Each test specifies a release title and whether it should match the format
|
||||
- Supports movie/series type differentiation for parser context
|
||||
- Unique constraint on (custom_format_id, title, type) prevents duplicate tests
|
||||
@@ -262,6 +262,24 @@ CREATE TABLE condition_years (
|
||||
FOREIGN KEY (custom_format_condition_id) REFERENCES custom_format_conditions(id) ON DELETE CASCADE
|
||||
);
|
||||
|
||||
-- ============================================================================
|
||||
-- CUSTOM FORMAT TESTING
|
||||
-- ============================================================================
|
||||
|
||||
-- Test cases for validating custom format matching logic
|
||||
-- Each test belongs to a custom format and specifies whether a title should match
|
||||
CREATE TABLE custom_format_tests (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
custom_format_id INTEGER NOT NULL,
|
||||
title TEXT NOT NULL, -- Release title to test against
|
||||
type VARCHAR(20) NOT NULL, -- 'movie' or 'series'
|
||||
should_match INTEGER NOT NULL, -- 1 = should match, 0 = should not match
|
||||
description TEXT, -- Why this test exists / edge case covered
|
||||
created_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
UNIQUE(custom_format_id, title, type),
|
||||
FOREIGN KEY (custom_format_id) REFERENCES custom_formats(id) ON DELETE CASCADE
|
||||
);
|
||||
|
||||
-- ============================================================================
|
||||
-- MEDIA MANAGEMENT TABLES
|
||||
-- ============================================================================
|
||||
|
||||
Reference in New Issue
Block a user