mirror of
https://github.com/Dictionarry-Hub/schema.git
synced 2026-11-03 06:46:15 +01:00
fix: make quality groups unique and not reusable across profiles
This commit is contained in:
1 parent
63a75fcda2
commit
2c93386cb0
2 files changed
+13
-8
No files matched your search
+12
-8
@@ -41,14 +41,6 @@ CREATE TABLE qualities (
|
||||
updated_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
|
||||
-- Quality groups combine multiple qualities treated as equivalent
|
||||
CREATE TABLE quality_groups (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
name VARCHAR(100) UNIQUE NOT NULL,
|
||||
created_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
updated_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
|
||||
-- Custom formats define patterns and conditions for media matching
|
||||
CREATE TABLE custom_formats (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
@@ -75,6 +67,18 @@ CREATE TABLE quality_profiles (
|
||||
updated_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
|
||||
-- Quality groups combine multiple qualities treated as equivalent
|
||||
-- Each group is specific to a quality profile (profiles do not share groups)
|
||||
CREATE TABLE quality_groups (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
quality_profile_id INTEGER NOT NULL,
|
||||
name VARCHAR(100) NOT NULL,
|
||||
created_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
updated_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
UNIQUE(quality_profile_id, name),
|
||||
FOREIGN KEY (quality_profile_id) REFERENCES quality_profiles(id) ON DELETE CASCADE
|
||||
);
|
||||
|
||||
-- Conditions define the matching logic for custom formats
|
||||
-- Each condition has a type and corresponding data in a type-specific table
|
||||
CREATE TABLE custom_format_conditions (
|
||||
|
||||
Reference in new issue
Block a user