{
  "version": "1.1.0",
  "description": "添加文本模板表",
  "created_at": "2025-08-12T11:00:00",
  "up_sql": "CREATE TABLE IF NOT EXISTS text_records (\n    id INTEGER PRIMARY KEY AUTOINCREMENT,\n    user_id INTEGER NOT NULL,\n    text_type VARCHAR(20) NOT NULL,\n    text_name VARCHAR(20) NOT NULL,\n    text_label VARCHAR(20) NOT NULL,\n    text_content TEXT NOT NULL,\n    created_at DATETIME DEFAULT CURRENT_TIMESTAMP,\n    CONSTRAINT fk_text_user FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE ON UPDATE CASCADE,\n    CONSTRAINT ck_text_type CHECK (text_type IN ('prompt','copywrite'))\n);\nCREATE INDEX IF NOT EXISTS idx_text_user_id ON text_records(user_id);\nCREATE INDEX IF NOT EXISTS idx_text_type ON text_records(text_type);\nCREATE INDEX IF NOT EXISTS idx_text_name ON text_records(text_name);\nCREATE INDEX IF NOT EXISTS idx_text_label ON text_records(text_label);",
  "down_sql": "DROP TABLE IF EXISTS text_records;"
}


