mirror of
https://github.com/Dictionarry-Hub/schema.git
synced 2026-05-03 06:14:17 +02:00
feat: add arr_type support for radarr/sonarr differentiation
This commit is contained in:
+11
-7
@@ -6,12 +6,16 @@ All schema changes will be documented in this file.
|
|||||||
|
|
||||||
- Hello, World!
|
- Hello, World!
|
||||||
- Initial PCD 2.0 schema definition
|
- Initial PCD 2.0 schema definition
|
||||||
- Core entity tables: quality_profiles, custom_formats, regular_expressions,
|
- Core entity tables: quality_profiles, custom_formats, regular_expressions,
|
||||||
languages, tags, qualities, quality_groups
|
languages, tags, qualities, quality_groups
|
||||||
- Custom format conditions system with 11 condition types (patterns, language,
|
- Custom format conditions system with 11 condition types (patterns, language,
|
||||||
indexer_flag, source, resolution, quality_modifier, size, release_type,
|
indexer_flag, source, resolution, quality_modifier, size, release_type, year)
|
||||||
year)
|
- Quality profile system supporting individual qualities and quality groups
|
||||||
- Quality profile system supporting individual qualities and quality groups
|
- Junction tables for tags, quality groups, profile qualities, and profile
|
||||||
- Junction tables for tags, quality groups, profile qualities, and profile
|
|
||||||
custom formats
|
custom formats
|
||||||
- Unique index ensuring single upgrade_until per profile
|
- Unique index ensuring single upgrade_until per profile
|
||||||
|
- Add arr_type support for Radarr/Sonarr differentiation
|
||||||
|
- custom_format_conditions.arr_type: conditions can be arr-specific or
|
||||||
|
universal
|
||||||
|
- quality_profile_custom_formats.arr_type: scores can differ between Radarr
|
||||||
|
and Sonarr
|
||||||
|
|||||||
+7
-5
@@ -83,9 +83,10 @@ CREATE TABLE custom_format_conditions (
|
|||||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||||
custom_format_id INTEGER NOT NULL,
|
custom_format_id INTEGER NOT NULL,
|
||||||
name VARCHAR(100) NOT NULL,
|
name VARCHAR(100) NOT NULL,
|
||||||
type VARCHAR(50) NOT NULL, -- release_title, release_group, edition, language, etc.
|
type VARCHAR(50) NOT NULL,
|
||||||
negate INTEGER NOT NULL DEFAULT 0, -- Invert the match (e.g., "NOT language")
|
arr_type VARCHAR(20) NOT NULL, -- 'radarr', 'sonarr', 'all'
|
||||||
required INTEGER NOT NULL DEFAULT 0, -- Condition must match for format to apply
|
negate INTEGER NOT NULL DEFAULT 0,
|
||||||
|
required INTEGER NOT NULL DEFAULT 0,
|
||||||
created_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
created_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||||
updated_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
updated_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||||
FOREIGN KEY (custom_format_id) REFERENCES custom_formats(id) ON DELETE CASCADE
|
FOREIGN KEY (custom_format_id) REFERENCES custom_formats(id) ON DELETE CASCADE
|
||||||
@@ -152,8 +153,9 @@ CREATE TABLE quality_profile_qualities (
|
|||||||
CREATE TABLE quality_profile_custom_formats (
|
CREATE TABLE quality_profile_custom_formats (
|
||||||
quality_profile_id INTEGER NOT NULL,
|
quality_profile_id INTEGER NOT NULL,
|
||||||
custom_format_id INTEGER NOT NULL,
|
custom_format_id INTEGER NOT NULL,
|
||||||
score INTEGER NOT NULL, -- Positive scores prefer, negative scores reject
|
arr_type VARCHAR(20) NOT NULL, -- 'radarr', 'sonarr', 'all',
|
||||||
PRIMARY KEY (quality_profile_id, custom_format_id),
|
score INTEGER NOT NULL,
|
||||||
|
PRIMARY KEY (quality_profile_id, custom_format_id, arr_type),
|
||||||
FOREIGN KEY (quality_profile_id) REFERENCES quality_profiles(id) ON DELETE CASCADE,
|
FOREIGN KEY (quality_profile_id) REFERENCES quality_profiles(id) ON DELETE CASCADE,
|
||||||
FOREIGN KEY (custom_format_id) REFERENCES custom_formats(id) ON DELETE CASCADE
|
FOREIGN KEY (custom_format_id) REFERENCES custom_formats(id) ON DELETE CASCADE
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user