Files
geo/server/migrations/20260418110000_simplify_kol_prompt_storage.down.sql
T
root 3ef0807456 fix: Enhance Kol Variable Rendering and Management
- Updated the regex for placeholder matching to support more flexible key formats.
- Refactored variable storage to allow both ID and key lookups in rendering.
- Improved schema validation to check for duplicate keys and enforce non-empty keys.
- Added new utility functions for variable value lookup and display name generation.
- Enhanced tests to cover new key-based variable scenarios.
- Refactored KolPrompt repository to simplify prompt storage and management, including the removal of obsolete revision handling.
- Introduced new API endpoints for saving, activating, and archiving prompts.
- Added new utility functions for handling Kol placeholders and platform options in the admin web.
- Implemented database migrations to simplify prompt storage structure and ensure data integrity.
2026-04-18 00:47:57 +08:00

13 lines
434 B
SQL

ALTER TABLE kol_usage_logs
DROP CONSTRAINT IF EXISTS fk_kol_usage_logs_prompt_revision;
ALTER TABLE kol_usage_logs
ADD CONSTRAINT fk_kol_usage_logs_prompt_revision
FOREIGN KEY (prompt_id, prompt_revision_no)
REFERENCES kol_prompt_revisions(prompt_id, revision_no);
ALTER TABLE kol_prompts
DROP COLUMN IF EXISTS card_config_json,
DROP COLUMN IF EXISTS schema_json,
DROP COLUMN IF EXISTS prompt_asset_key;