mirror of
https://github.com/ansible/awx.git
synced 2026-05-16 13:57:39 -02:30
Merge pull request #2587 from chrismeyersfsu/enhancement-dont_drop_mongo
do not drop mongo after migration
This commit is contained in:
@@ -35,6 +35,10 @@ def migrate_facts(apps, schema_editor):
|
|||||||
# TODO: This means the database was up but something happened when we tried to query it
|
# TODO: This means the database was up but something happened when we tried to query it
|
||||||
return (0, 0)
|
return (0, 0)
|
||||||
|
|
||||||
|
# Migration already happened
|
||||||
|
if Fact.objects.all().count() > 0:
|
||||||
|
return (migrated_count, not_migrated_count)
|
||||||
|
|
||||||
migrated_count = 0
|
migrated_count = 0
|
||||||
not_migrated_count = 0
|
not_migrated_count = 0
|
||||||
transform = KeyTransform([('.', '\uff0E'), ('$', '\uff04')])
|
transform = KeyTransform([('.', '\uff0E'), ('$', '\uff04')])
|
||||||
@@ -49,5 +53,4 @@ def migrate_facts(apps, schema_editor):
|
|||||||
# This isn't a hard error. Just something the user would want to know.
|
# This isn't a hard error. Just something the user would want to know.
|
||||||
not_migrated_count += 1
|
not_migrated_count += 1
|
||||||
|
|
||||||
drop_system_tracking_db()
|
|
||||||
return (migrated_count, not_migrated_count)
|
return (migrated_count, not_migrated_count)
|
||||||
|
|||||||
Reference in New Issue
Block a user