From b34ee01fb34edbe3e4f26500ff5f4ccafb36c160 Mon Sep 17 00:00:00 2001 From: Alan Rominger Date: Mon, 19 Jan 2026 13:33:46 -0500 Subject: [PATCH] Slightly alter history to avoid having a Django 5 related migration (#16214) * Slightly alter history to avoid having a Django 5 related migration * Revert prior field states to be slightly more clear --- awx/main/migrations/0001_initial.py | 2 +- .../migrations/0002_squashed_v300_release.py | 4 ++- awx/main/migrations/0189_inbound_hop_nodes.py | 4 ++- ...instance_peers_alter_job_hosts_and_more.py | 32 ------------------- 4 files changed, 7 insertions(+), 35 deletions(-) delete mode 100644 awx/main/migrations/0205_alter_instance_peers_alter_job_hosts_and_more.py diff --git a/awx/main/migrations/0001_initial.py b/awx/main/migrations/0001_initial.py index c9d7a2ad15..9a7a3273d8 100644 --- a/awx/main/migrations/0001_initial.py +++ b/awx/main/migrations/0001_initial.py @@ -1581,7 +1581,7 @@ class Migration(migrations.Migration): migrations.AddField( model_name='job', name='hosts', - field=models.ManyToManyField(related_name='jobs', editable=False, through='main.JobHostSummary', to='main.Host'), + field=models.ManyToManyField(related_name='jobs', editable=False, through='main.JobHostSummary', through_fields=('job', 'host'), to='main.Host'), ), migrations.AddField( model_name='job', diff --git a/awx/main/migrations/0002_squashed_v300_release.py b/awx/main/migrations/0002_squashed_v300_release.py index 413869d88d..01b455344b 100644 --- a/awx/main/migrations/0002_squashed_v300_release.py +++ b/awx/main/migrations/0002_squashed_v300_release.py @@ -487,7 +487,9 @@ class Migration(migrations.Migration): migrations.AddField( model_name='role', name='ancestors', - field=models.ManyToManyField(related_name='descendents', through='main.RoleAncestorEntry', to='main.Role'), + field=models.ManyToManyField( + related_name='descendents', through='main.RoleAncestorEntry', through_fields=('descendent', 'ancestor'), to='main.Role' + ), ), migrations.AlterIndexTogether( name='role', diff --git a/awx/main/migrations/0189_inbound_hop_nodes.py b/awx/main/migrations/0189_inbound_hop_nodes.py index aaaaff9aec..dd8685f460 100644 --- a/awx/main/migrations/0189_inbound_hop_nodes.py +++ b/awx/main/migrations/0189_inbound_hop_nodes.py @@ -132,7 +132,9 @@ class Migration(migrations.Migration): migrations.AlterField( model_name='instance', name='peers', - field=models.ManyToManyField(related_name='peers_from', through='main.InstanceLink', to='main.receptoraddress'), + field=models.ManyToManyField( + related_name='peers_from', through='main.InstanceLink', through_fields=('source', 'target'), to='main.receptoraddress' + ), ), migrations.AlterField( model_name='instancelink', diff --git a/awx/main/migrations/0205_alter_instance_peers_alter_job_hosts_and_more.py b/awx/main/migrations/0205_alter_instance_peers_alter_job_hosts_and_more.py deleted file mode 100644 index 259bf42720..0000000000 --- a/awx/main/migrations/0205_alter_instance_peers_alter_job_hosts_and_more.py +++ /dev/null @@ -1,32 +0,0 @@ -# Generated by Django 5.2.8 on 2025-11-20 18:39 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('main', '0204_squashed_deletions'), - ] - - operations = [ - migrations.AlterField( - model_name='instance', - name='peers', - field=models.ManyToManyField( - related_name='peers_from', through='main.InstanceLink', through_fields=('source', 'target'), to='main.receptoraddress' - ), - ), - migrations.AlterField( - model_name='job', - name='hosts', - field=models.ManyToManyField(editable=False, related_name='jobs', through='main.JobHostSummary', through_fields=('job', 'host'), to='main.host'), - ), - migrations.AlterField( - model_name='role', - name='ancestors', - field=models.ManyToManyField( - related_name='descendents', through='main.RoleAncestorEntry', through_fields=('descendent', 'ancestor'), to='main.role' - ), - ), - ]