2021-04-08 08:08:59 +00:00
|
|
|
DELETE from orient_wordpress.arient_ru_posts where post_type not in ('post','attachment');
|
|
|
|
|
DELETE from orient_wordpress.arient_ru_posts where post_status in ('draft','auto-draft');
|
|
|
|
|
|
2021-03-29 10:39:52 +00:00
|
|
|
ALTER TABLE `rainlab_blog_posts` CHANGE `title` `title` VARCHAR(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL, CHANGE `slug` `slug` VARCHAR(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL;
|
|
|
|
|
|
|
|
|
|
INSERT INTO orient.rainlab_blog_posts (user_id,title,slug,excerpt,content_html,published_at,published,created_at,updated_at,locale,id_en)
|
|
|
|
|
SELECT post_author,post_title,post_name,post_excerpt,post_content,post_date,1,post_date,post_modified,'en',id from orient_wordpress.arient_2_posts;
|
|
|
|
|
|
2021-04-08 08:08:59 +00:00
|
|
|
INSERT INTO orient.rainlab_blog_posts (user_id,title,slug,excerpt,content,content_html,published_at,published,created_at,updated_at,locale,id_en)
|
|
|
|
|
SELECT post_author,post_title,post_name,post_excerpt,post_content,post_content,post_date,1,post_date,post_modified,'ru',id
|
|
|
|
|
from orient_wordpress.arient_ru_posts where post_type='post' and post_status='publish';
|
|
|
|
|
|
2021-03-29 10:39:52 +00:00
|
|
|
UPDATE rainlab_blog_posts SET powerseo_title = title, powerseo_description = excerpt, powerseo_robot_index = 'index', powerseo_robot_follow = 'nofollow';
|
|
|
|
|
|
|
|
|
|
//////// angliski postlarda 2019dan ashakdaky materiallar pozulan
|
|
|
|
|
Delete FROM arient_2_posts_temp WHERE post_date <'2019-01-01'
|
|
|
|
|
|
|
|
|
|
////////////////////////////////insert featured images
|
|
|
|
|
UPDATE rainlab_blog_posts rb
|
2021-04-08 08:08:59 +00:00
|
|
|
inner join iatm_2_postmeta ip on rb.id_en = ip.post_id and ip.meta_key='_thumbnail_id'
|
2021-03-29 10:39:52 +00:00
|
|
|
inner join arient_2_posts_temp wp on wp.ID = ip.meta_value
|
|
|
|
|
set rb.featerd_image = wp.guid
|
|
|
|
|
|
2021-04-08 08:08:59 +00:00
|
|
|
ALTER TABLE `rainlab_blog_posts` CHANGE `featured_image` `featured_image` VARCHAR(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL;
|
|
|
|
|
|
|
|
|
|
UPDATE rainlab_blog_posts rb
|
|
|
|
|
inner join orient_wordpress.iatm_orient_postmeta ip on rb.id_ru = ip.post_id and ip.meta_key='_thumbnail_id'
|
|
|
|
|
inner join orient_wordpress.arient_ru_posts wp on wp.ID = ip.meta_value
|
|
|
|
|
set rb.featured_image = REPLACE(wp.guid,'https://orient.tm/en/wp-content/','')
|
|
|
|
|
|
2021-03-29 10:39:52 +00:00
|
|
|
////////////// replace image address
|
|
|
|
|
UPDATE rainlab_blog_posts set featured_image = REPLACE(featured_image,'https://orient.tm/en/wp-content/','') where featured_image !=''
|
2021-04-01 06:04:39 +00:00
|
|
|
|
|
|
|
|
///////////////////////post views//////
|
|
|
|
|
INSERT INTO orient.vdomah_blogviews_views (views,post_id)
|
|
|
|
|
select pp.pageviews,rb.id FROM orient_wordpress.iatm_orient_2_popularpostsdata pp
|
|
|
|
|
INNER join orient.rainlab_blog_posts rb on rb.id_en = pp.postid
|
|
|
|
|
|
2021-04-08 08:08:59 +00:00
|
|
|
INSERT INTO orient.vdomah_blogviews_views (views,post_id)
|
|
|
|
|
select pp.pageviews,rb.id FROM orient_wordpress.iatm_orient_popularpostsdata pp
|
|
|
|
|
INNER join orient.rainlab_blog_posts rb on rb.id_ru = pp.postid AND rb.locale = 'ru'
|
|
|
|
|
|