diff --git a/core/pyproject.toml b/core/pyproject.toml index 490ff7b811..12944dec71 100644 --- a/core/pyproject.toml +++ b/core/pyproject.toml @@ -233,7 +233,6 @@ clean-objectlog = "zeit.objectlog.objectlog:clean" dav-cache-sweep = "zeit.connector.cache:sweep" delete-content = "zeit.cms.content.cli:delete_content" delete-content-from-tms-indexes = "zeit.retresco.cli:delete_content_from_tms_indexes" -dump_references = "zeit.cms.relation.migrate:dump_references" external-javascript-sweep = "zeit.sourcepoint.connection:sweep" external-javascript-update = "zeit.sourcepoint.connection:update" import-dpa-news-api = "zeit.newsimport.cli:import_dpa_news_api" @@ -242,7 +241,6 @@ export-import-objectlogs = "zeit.objectlog.cli:export_import" export-import-permissions = "zeit.securitypolicy.cli:export_import" export-import-workingcopy = "zeit.cms.workingcopy.cli:export_import" ingredients-collect-used = "zeit.wochenmarkt.ingredients:collect_used" -load_references = "zeit.cms.relation.migrate:load_references" prewarm-cache = "zeit.connector.cli:prewarm_cache" provide-interface = "zeit.cms.cli:provide_interface" publish-content = "zeit.cms.workflow.cli:publish" diff --git a/core/src/zeit/cms/relation/migrate.py b/core/src/zeit/cms/relation/migrate.py deleted file mode 100644 index 7e2c2eeffd..0000000000 --- a/core/src/zeit/cms/relation/migrate.py +++ /dev/null @@ -1,41 +0,0 @@ -import sys - -import transaction -import zope.component -import zope.component.hooks - -import zeit.cms.interfaces -import zeit.cms.relation.interfaces - - -# these are 'zopectl run' scripts to migrate the old indexes into the new index -# created for #6300. - - -def dump_references(root): - zope.component.hooks.setSite(root) - relations = zope.component.getUtility(zeit.cms.relation.interfaces.IRelations) - for token in relations._catalog_generation8.findRelationTokens(): - print((token.encode('utf8'))) - - -def load_references(root): - import zeit.cms.testing - - zeit.cms.testing.create_interaction('zope.manager') - _index(root, [x.strip() for x in sys.stdin.readlines()]) - - -def _index(root, ids): - zope.component.hooks.setSite(root) - relations = zope.component.getUtility(zeit.cms.relation.interfaces.IRelations) - for id in ids: - print(id) - id = id.decode('utf-8') - obj = zeit.cms.interfaces.ICMSContent(id, None) - if obj is None: - print('not found.') - continue - relations.index(obj) - transaction.commit() - print('indexed.')