core/migration
2022-07-21 14:58:50 +03:00
..
html2text psql-migration-fixes 2022-07-14 16:41:53 +03:00
tables wip refactoring: reactions, storages isolated 2022-07-21 14:58:50 +03:00
__init__.py role_id and topic relations fixes 2021-08-20 12:27:19 +03:00
.DS_Store migration api upgraded 2021-10-04 20:06:05 +03:00
bson2json.py migration-fixes 2022-07-14 15:35:22 +03:00
export.py wip refactoring: reactions, storages isolated 2022-07-21 14:58:50 +03:00
extract.py fix 2022-07-08 10:42:33 +03:00
README.md migration update 2022-07-13 19:01:48 +03:00
utils.py role_id and topic relations fixes 2021-08-20 12:27:19 +03:00

discours-migration

First, put the data into this folder.

Install

pipenv install -r requirements.txt

Using

Put the unpacked mongodump to the data folder and operate with pipenv shell && python

get old data jsons

import bson2json

bson2json.json_tables() # creates all the needed data json from bson mongodump

migrate all

pipenv install
pipenv run python migrate.py all

or migrate all with mdx exports

pipenv install
pipenv run python migrate.py all mdx

Note: this will create db entries and it is not tolerant to existed unique email.

or one shout by slug

pipenv run python migrate.py - <shout-slug>