feat: v0.9.0 — Backend Notion-Style (propriétés custom, AI keywords, sync)
DB:
- project_properties: propriétés custom par projet (select, multi_select, date, person, text)
- property_values: valeurs par issue (UNIQUE property+issue)
- ai_keywords: mots-clés extraits automatiquement (keyword, color, usage_count)
Backend:
- /board/api/properties/{o}/{r} — CRUD propriétés custom
- /board/api/ai-keywords/{o}/{r} — GET keywords list
- /board/api/ai-keywords/{o}/{r}/extract — POST ré-extraction
- /board/api/sync/{o}/{r} — POST sync bidirectionnelle complète
- _map_issue_to_card enrichi: custom_props + keywords par issue
- _extract_ai_keywords: extraction depuis labels + body texte
Documentation:
- ROADMAP v0.9.0 ✅ (5/5 checkboxes)
This commit is contained in:
@@ -99,6 +99,37 @@ def init_db():
|
||||
position INTEGER NOT NULL DEFAULT 0,
|
||||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS project_properties (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
project_owner TEXT NOT NULL,
|
||||
project_name TEXT NOT NULL,
|
||||
name TEXT NOT NULL,
|
||||
prop_type TEXT NOT NULL DEFAULT 'select', -- select, multi_select, date, person, text
|
||||
options_json TEXT DEFAULT '[]', -- for select/multi_select
|
||||
position INTEGER NOT NULL DEFAULT 0,
|
||||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
UNIQUE(project_owner, project_name, name)
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS property_values (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
property_id INTEGER NOT NULL REFERENCES project_properties(id) ON DELETE CASCADE,
|
||||
gitea_issue_id INTEGER NOT NULL,
|
||||
value TEXT NOT NULL DEFAULT '',
|
||||
UNIQUE(property_id, gitea_issue_id)
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS ai_keywords (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
project_owner TEXT NOT NULL,
|
||||
project_name TEXT NOT NULL,
|
||||
keyword TEXT NOT NULL,
|
||||
color TEXT NOT NULL DEFAULT '#787774',
|
||||
usage_count INTEGER NOT NULL DEFAULT 1,
|
||||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
UNIQUE(project_owner, project_name, keyword)
|
||||
);
|
||||
""")
|
||||
conn.commit()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user