Import Blog post
Closed this issue · 3 comments
Tim-VL commented
Would be great if there is a option to import/convert blog post from the older versions/SasBlogModule
7underlines commented
Back up your database, then run these SQL commands right after switching to the new version.
INSERT INTO werkl_blog_author
SELECT * FROM sas_blog_author
WHERE id != UNHEX('64F4C60194634128B9B85D9299797C45');
INSERT INTO werkl_blog_author_translation
SELECT * FROM sas_blog_author_translation;
INSERT INTO werkl_blog_blog_category
SELECT * FROM sas_blog_blog_category;
DELETE FROM werkl_blog_category;
INSERT INTO werkl_blog_category
SELECT * FROM sas_blog_category;
DELETE FROM werkl_blog_category_translation;
INSERT INTO werkl_blog_category_translation
SELECT * FROM sas_blog_category_translation;
INSERT INTO werkl_blog_entries
SELECT * FROM sas_blog_entries;
INSERT INTO werkl_blog_entries_translation
SELECT * FROM sas_blog_entries_translation;
# Edit: I forgot the seo_url_template
INSERT INTO `seo_url_template` (`id`, `sales_channel_id`, `route_name`, `entity_name`, `template`, `is_valid`, `custom_fields`, `created_at`, `updated_at`) VALUES
(UNHEX('0193EA8AA36073C48660FC113F43FCA7'), NULL, 'werkl.frontend.blog.detail', 'werkl_blog_entries', 'blog/{{ entry.translated.title|lower }}', 1, NULL, '2024-12-21 18:46:14.624', NULL);
phit commented
why is this not a migration in the plugin?
7underlines commented
Sure, we could also implement it as a migration in the plugin. Pull requests are welcome.