diff --git a/awx/main/migrations/0004_v300_fact_changes.py b/awx/main/migrations/0004_v300_changes.py similarity index 100% rename from awx/main/migrations/0004_v300_fact_changes.py rename to awx/main/migrations/0004_v300_changes.py diff --git a/awx/main/migrations/0005_v300_fact_migrations.py b/awx/main/migrations/0005_v300_changes.py similarity index 87% rename from awx/main/migrations/0005_v300_fact_migrations.py rename to awx/main/migrations/0005_v300_changes.py index 8362227c2f..70dea77778 100644 --- a/awx/main/migrations/0005_v300_fact_migrations.py +++ b/awx/main/migrations/0005_v300_changes.py @@ -7,7 +7,7 @@ from django.db import migrations class Migration(migrations.Migration): dependencies = [ - ('main', '0004_v300_fact_changes'), + ('main', '0004_v300_changes'), ] operations = [ diff --git a/awx/main/migrations/0006_v300_changes.py b/awx/main/migrations/0006_v300_changes.py index fb2e4a1b7c..4d60f2c795 100644 --- a/awx/main/migrations/0006_v300_changes.py +++ b/awx/main/migrations/0006_v300_changes.py @@ -107,7 +107,7 @@ def create_system_job_templates(apps, schema_editor): class Migration(migrations.Migration): dependencies = [ - ('main', '0005_v300_fact_migrations'), + ('main', '0005_v300_changes'), ] operations = [ diff --git a/awx/main/migrations/_system_tracking.py b/awx/main/migrations/_system_tracking.py index 95fdb62c2e..e5be20f4ef 100644 --- a/awx/main/migrations/_system_tracking.py +++ b/awx/main/migrations/_system_tracking.py @@ -16,7 +16,12 @@ def migrate_facts(apps, schema_editor): Fact = apps.get_model('main', "Fact") Host = apps.get_model('main', "Host") - # TODO: Check to see if mongo connection works and mongo is on. + try: + n = FactVersion.objects.all().count() + except ConnectionError: + # TODO: Let the user know about the error. Likely this is + # a new install and we just don't need to do this + return (0, 0) migrated_count = 0 not_migrated_count = 0