This migration will:
source_url
column to news_items
tablesource_url
field-- Add source_url column ALTER TABLE `news_items` ADD COLUMN `source_url` varchar(1000) DEFAULT NULL AFTER `image_url`; -- Add performance index ALTER TABLE `news_items` ADD KEY `idx_source_url` (`source_url`(255)); -- Update existing RSS items UPDATE news_items ni SET source_url = ( SELECT rfi.link FROM rss_feed_items rfi INNER JOIN rss_feeds rf ON rfi.feed_id = rf.id WHERE rfi.title = ni.title AND rf.name = ni.source LIMIT 1 ) WHERE ni.source IN (SELECT name FROM rss_feeds) AND ni.source_url IS NULL;
Migration Script v1.1.0 - Telugu News Backend