- Implemented admin page for manual articles with fields for title, module, difficulty, tags, summary, content, steps, and relations. - Added preview functionality for markdown content. - Created list view for recent manuals with edit and view options. - Developed detail view for individual manuals displaying content, steps, and related guides. - Established database schema for manual articles, steps, and relations with appropriate indexing. - Seeded initial manual articles and steps for core functionalities. - Normalized newline characters in existing manual content. - Added additional manuals and steps for enhanced user guidance.
17 lines
529 B
SQL
17 lines
529 B
SQL
-- 163_normalize_manual_newlines.sql
|
|
-- Normalize legacy literal "\\n" sequences in manual text fields to real newlines.
|
|
|
|
UPDATE manual_articles
|
|
SET
|
|
content = REPLACE(content, E'\\n', E'\n'),
|
|
summary = REPLACE(COALESCE(summary, ''), E'\\n', E'\n'),
|
|
updated_at = CURRENT_TIMESTAMP
|
|
WHERE POSITION(E'\\n' IN content) > 0
|
|
OR POSITION(E'\\n' IN COALESCE(summary, '')) > 0;
|
|
|
|
UPDATE manual_steps
|
|
SET
|
|
content = REPLACE(content, E'\\n', E'\n'),
|
|
updated_at = CURRENT_TIMESTAMP
|
|
WHERE POSITION(E'\\n' IN content) > 0;
|