mirror of
https://github.com/Dictionarry-Hub/schema.git
synced 2026-05-03 06:14:17 +02:00
feat: better langauge processing for profiles
This commit is contained in:
+12
-3
@@ -71,10 +71,8 @@ CREATE TABLE quality_profiles (
|
||||
minimum_custom_format_score INTEGER NOT NULL DEFAULT 0,
|
||||
upgrade_until_score INTEGER NOT NULL DEFAULT 0,
|
||||
upgrade_score_increment INTEGER NOT NULL DEFAULT 1 CHECK (upgrade_score_increment > 0),
|
||||
language_id INTEGER NOT NULL,
|
||||
created_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
updated_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
FOREIGN KEY (language_id) REFERENCES languages(id)
|
||||
updated_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
|
||||
-- Conditions define the matching logic for custom formats
|
||||
@@ -123,6 +121,17 @@ CREATE TABLE quality_profile_tags (
|
||||
FOREIGN KEY (tag_id) REFERENCES tags(id) ON DELETE CASCADE
|
||||
);
|
||||
|
||||
-- Link quality profiles to languages with type modifiers
|
||||
-- Type can be: 'must', 'only', 'not', or 'simple' (default language preference)
|
||||
CREATE TABLE quality_profile_languages (
|
||||
quality_profile_id INTEGER NOT NULL,
|
||||
language_id INTEGER NOT NULL,
|
||||
type VARCHAR(20) NOT NULL DEFAULT 'simple', -- 'must', 'only', 'not', 'simple'
|
||||
PRIMARY KEY (quality_profile_id, language_id),
|
||||
FOREIGN KEY (quality_profile_id) REFERENCES quality_profiles(id) ON DELETE CASCADE,
|
||||
FOREIGN KEY (language_id) REFERENCES languages(id) ON DELETE CASCADE
|
||||
);
|
||||
|
||||
-- Define which qualities belong to which quality groups
|
||||
-- All qualities in a group are treated as equivalent
|
||||
CREATE TABLE quality_group_members (
|
||||
|
||||
Reference in New Issue
Block a user