update
This commit is contained in:
15
migrations/011_prompt_quality_upgrade.sql
Normal file
15
migrations/011_prompt_quality_upgrade.sql
Normal file
@@ -0,0 +1,15 @@
|
||||
-- Upgrade default article generation quality settings (safe for existing custom prompts)
|
||||
UPDATE settings
|
||||
SET value = 'Jestes doswiadczonym redaktorem SEO i ghostwriterem. Pisz po polsku naturalnie, konkretnie i bez AI-owych klisz. Artykul ma miec od {min_words} do {max_words} slow. Formatuj tresc tylko jako HTML (bez <html>, <body>, <head>) i zachowaj strukture: lead, sekcje H2/H3, listy praktyczne, sekcja FAQ. Uzywaj realnych przykladow i jezyka, ktory brzmi jak tekst napisany przez czlowieka z doswiadczeniem. Nie naduzywaj pytan retorycznych i unikaj fraz typu: "w dzisiejszych czasach", "podsumowujac", "warto zauwazyc". Zwracaj odpowiedz WYLACZNIE jako JSON: {"title":"...","content":"..."}'
|
||||
WHERE `key` = 'article_generation_prompt'
|
||||
AND value LIKE '%copywriterem SEO%'
|
||||
AND value LIKE '%{min_words}%'
|
||||
AND value LIKE '%{max_words}%';
|
||||
|
||||
UPDATE settings
|
||||
SET value = '900'
|
||||
WHERE `key` = 'article_min_words' AND value = '800';
|
||||
|
||||
UPDATE settings
|
||||
SET value = '1400'
|
||||
WHERE `key` = 'article_max_words' AND value = '1200';
|
||||
10
migrations/012_internal_linking_smart_matching.sql
Normal file
10
migrations/012_internal_linking_smart_matching.sql
Normal file
@@ -0,0 +1,10 @@
|
||||
-- Internal linking smart matching: article URL + settings
|
||||
ALTER TABLE articles
|
||||
ADD COLUMN wp_post_url VARCHAR(1000) NULL AFTER wp_post_id;
|
||||
|
||||
INSERT INTO settings (`key`, value) VALUES
|
||||
('internal_linking_enabled', '1'),
|
||||
('internal_link_min_count', '2'),
|
||||
('internal_link_max_count', '4'),
|
||||
('openai_embedding_model', 'text-embedding-3-small')
|
||||
ON DUPLICATE KEY UPDATE value = value;
|
||||
18
migrations/013_statlink_tracking.sql
Normal file
18
migrations/013_statlink_tracking.sql
Normal file
@@ -0,0 +1,18 @@
|
||||
-- BackPRO StatLink.pl integration - link lifecycle tracking
|
||||
CREATE TABLE IF NOT EXISTS statlink_links (
|
||||
id INT AUTO_INCREMENT PRIMARY KEY,
|
||||
article_id INT NOT NULL,
|
||||
site_id INT NOT NULL,
|
||||
statlink_id INT NULL COMMENT 'ID linku w systemie StatLink.pl',
|
||||
anchor VARCHAR(500) NOT NULL,
|
||||
link_url VARCHAR(500) NOT NULL,
|
||||
added_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
expires_at DATETIME NOT NULL,
|
||||
removed_at DATETIME NULL,
|
||||
status ENUM('active', 'expired', 'removed', 'failed') NOT NULL DEFAULT 'active',
|
||||
error_message TEXT NULL,
|
||||
created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
INDEX idx_article_id (article_id),
|
||||
INDEX idx_status_expires (status, expires_at),
|
||||
INDEX idx_site_id (site_id)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
Reference in New Issue
Block a user