Created
March 4, 2013 06:41
-
-
Save scoopseven/5080445 to your computer and use it in GitHub Desktop.
Zinnia -> Mezzanine SQL Import
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Categories | |
insert into mezzanine_db.blog_blogcategory (id, site_id, title, slug) | |
select id, '1', title, slug from zinnia_db.zinnia_category; | |
# Entries/Posts | |
insert into mezzanine_db.blog_blogpost (id, site_id, title, slug, description, gen_description, status, publish_date, in_sitemap, content, user_id, allow_comments) | |
select id, '1', title, slug, excerpt, '1', '2', creation_date, '1', content, '1', '0' from zinnia_db.zinnia_entry; | |
# Category->Post Relationships | |
insert into mezzanine_db.blog_blogpost_categories (id, blogpost_id, blogcategory_id) | |
select id, entry_id, category_id from zinnia_db.zinnia_entry_categories; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment