Files
aitsc/scripts/prompt_quality_schema.sql
2026-04-06 19:02:21 +08:00

16 lines
749 B
SQL
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
-- 提示词结构化质量评价表SQLite 与 MySQL 通用写法MySQL 可将 evaluation_json 改为 JSON 类型)
CREATE TABLE IF NOT EXISTS prompt_quality_record (
id INTEGER PRIMARY KEY AUTOINCREMENT,
user_id INTEGER NOT NULL,
batch_id VARCHAR(36) NOT NULL,
prompt_index INTEGER NOT NULL DEFAULT 0,
optimized_prompt TEXT NOT NULL,
evaluation_json TEXT NOT NULL,
batch_summary TEXT,
incremental_hints_json TEXT,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
CREATE INDEX IF NOT EXISTS ix_pqr_user_id ON prompt_quality_record (user_id);
CREATE INDEX IF NOT EXISTS ix_pqr_batch_id ON prompt_quality_record (batch_id);
CREATE INDEX IF NOT EXISTS ix_pqr_created_at ON prompt_quality_record (created_at);