Commit 83fd65be authored by Michal Čihař's avatar Michal Čihař

Remove reverse migration for data dir

Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent 9b9e2318
......@@ -77,19 +77,3 @@ def migrate_data_dirs():
if os.path.exists(source) and not os.path.exists(target):
shutil.copy(source, target)
def unmigrate_data_dirs():
"""
Reverses data paths migration.
"""
vcs = data_dir('vcs')
if not os.path.exists(appsettings.GIT_ROOT) and os.path.exists(vcs):
shutil.move(vcs, appsettings.GIT_ROOT)
whoosh = data_dir('whoosh')
# This one gets autocreated
if os.path.exists(appsettings.WHOOSH_INDEX):
os.rmdir(appsettings.WHOOSH_INDEX)
if os.path.exists(whoosh):
shutil.move(whoosh, appsettings.WHOOSH_INDEX)
......@@ -2,7 +2,7 @@
from __future__ import unicode_literals
from django.db import migrations
from weblate.trans.data import migrate_data_dirs, unmigrate_data_dirs
from weblate.trans.data import migrate_data_dirs
class Migration(migrations.Migration):
......@@ -14,6 +14,5 @@ class Migration(migrations.Migration):
operations = [
migrations.RunPython(
lambda apps, schema_editor: migrate_data_dirs(),
reverse_code=lambda apps, schema_editor: unmigrate_data_dirs(),
),
]
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment