From b3f548676114963041414365d80229836fe524b9 Mon Sep 17 00:00:00 2001 From: rr- Date: Tue, 10 May 2016 09:26:06 +0200 Subject: [PATCH] server/tools: add --no-data option to importer --- server/migrate-v1 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/server/migrate-v1 b/server/migrate-v1 index f5fa56d..af6a718 100755 --- a/server/migrate-v1 +++ b/server/migrate-v1 @@ -66,6 +66,11 @@ def parse_args(): metavar='PASSWORD', required=True, help='v1.x database password') + parser.add_argument( + '--no-data', + action='store_true', + help='don\'t migrate post data') + return parser.parse_args() def exec(session, query): @@ -376,7 +381,8 @@ def main(): unused_tag_ids = import_tags(category_to_id_map, v1_session, v2_session) import_tag_relations(unused_tag_ids, v1_session, v2_session) unused_post_ids = import_posts(v1_session, v2_session) - import_post_content(unused_post_ids, v1_data_dir, v1_session, v2_session) + if not args.no_data: + import_post_content(unused_post_ids, v1_data_dir, v1_session, v2_session) import_post_tags(unused_post_ids, v1_session, v2_session) import_post_notes(unused_post_ids, v1_session, v2_session) import_post_relations(unused_post_ids, v1_session, v2_session)