# Awx-operator 2.1.0 to awx-operator 2.2.0 upgrade fails

**URL:** <https://forum.ansible.com/t/awx-operator-2-1-0-to-awx-operator-2-2-0-upgrade-fails/4717>\
**Category:** Get Help\
**Tags:** awx\
**Created:** [April 4, 2024, 10:58am UTC](https://forum.ansible.com/t/awx-operator-2-1-0-to-awx-operator-2-2-0-upgrade-fails/4717 "2024-04-04T10:58:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![lahatch](https://avatars.discourse-cdn.com/v4/letter/l/6bbea6/32.png) [@lahatch](https://forum.ansible.com/u/lahatch)\
**Post date:** [April 4, 2024, 10:58am UTC](https://forum.ansible.com/t/awx-operator-2-1-0-to-awx-operator-2-2-0-upgrade-fails/4717/1 "2024-04-04T10:58:44Z")

</div>

Hi Everyone,

when trying to upgrade my AWX instance, I have an issue with the database migration.

By entering into awx-web pod, I can see the following

**bash-5.1$ awx-manage showmigrations**  
auth  
 0001\_initial  
 0002\_alter\_permission\_name\_max\_length  
 0003\_alter\_user\_email\_max\_length  
 0004\_alter\_user\_username\_opts  
 0005\_alter\_user\_last\_login\_null  
 0006\_require\_contenttypes\_0002  
 0007\_alter\_validators\_add\_error\_messages  
 0008\_alter\_user\_username\_max\_length  
 0009\_alter\_user\_last\_name\_max\_length  
 0010\_alter\_group\_name\_max\_length  
 0011\_update\_proxy\_permissions  
 0012\_alter\_user\_first\_name\_max\_length  
conf  
 0001\_initial  
 0002\_v310\_copy\_tower\_settings  
 0003\_v310\_JSONField\_changes  
 0004\_v320\_reencrypt  
 0005\_v330\_rename\_two\_session\_settings  
 0006\_v331\_ldap\_group\_type  
 0007\_v380\_rename\_more\_settings  
 0008\_subscriptions  
 0009\_rename\_proot\_settings  
contenttypes  
 0001\_initial  
 0002\_remove\_content\_type\_name  
main  
 0001\_initial  
 0002\_squashed\_v300\_release (18 squashed migrations)  
 0003\_squashed\_v300\_v303\_updates (9 squashed migrations)  
 0004\_squashed\_v310\_release (6 squashed migrations)  
 0005\_squashed\_v310\_v313\_updates (3 squashed migrations)  
 0006\_v320\_release  
 0007\_v320\_data\_migrations  
 0008\_v320\_drop\_v1\_credential\_fields  
 0009\_v322\_add\_setting\_field\_for\_activity\_stream  
 0010\_v322\_add\_ovirt4\_tower\_inventory  
 0011\_v322\_encrypt\_survey\_passwords  
 0012\_v322\_update\_cred\_types  
 0013\_v330\_multi\_credential  
 0014\_v330\_saved\_launchtime\_configs  
 0015\_v330\_blank\_start\_args  
 0016\_v330\_non\_blank\_workflow  
 0017\_v330\_move\_deprecated\_stdout  
 0018\_v330\_add\_additional\_stdout\_events  
 0019\_v330\_custom\_virtualenv  
 0020\_v330\_instancegroup\_policies  
 0021\_v330\_declare\_new\_rbac\_roles  
 0022\_v330\_create\_new\_rbac\_roles  
 0023\_v330\_inventory\_multicred  
 0024\_v330\_create\_user\_session\_membership  
 0025\_v330\_add\_oauth\_activity\_stream\_registrar  
 0026\_v330\_delete\_authtoken  
 0027\_v330\_emitted\_events  
 0028\_v330\_add\_tower\_verify  
 0030\_v330\_modify\_application  
 0031\_v330\_encrypt\_oauth2\_secret  
 0032\_v330\_polymorphic\_delete  
 0033\_v330\_oauth\_help\_text  
 0034\_v330\_delete\_user\_role  
 0035\_v330\_more\_oauth2\_help\_text  
 0036\_v330\_credtype\_remove\_become\_methods  
 0037\_v330\_remove\_legacy\_fact\_cleanup  
 0038\_v330\_add\_deleted\_activitystream\_actor  
 0039\_v330\_custom\_venv\_help\_text  
 0040\_v330\_unifiedjob\_controller\_node  
 0041\_v330\_update\_oauth\_refreshtoken  
 0042\_v330\_org\_member\_role\_deparent  
 0043\_v330\_oauth2accesstoken\_modified  
 0044\_v330\_add\_inventory\_update\_inventory  
 0045\_v330\_instance\_managed\_by\_policy  
 0046\_v330\_remove\_client\_credentials\_grant  
 0047\_v330\_activitystream\_instance  
 0048\_v330\_django\_created\_modified\_by\_model\_name  
 0049\_v330\_validate\_instance\_capacity\_adjustment  
 0050\_v340\_drop\_celery\_tables  
 0051\_v340\_job\_slicing  
 0052\_v340\_remove\_project\_scm\_delete\_on\_next\_update  
 0053\_v340\_workflow\_inventory  
 0054\_v340\_workflow\_convergence  
 0055\_v340\_add\_grafana\_notification  
 0056\_v350\_custom\_venv\_history  
 0057\_v350\_remove\_become\_method\_type  
 0058\_v350\_remove\_limit\_limit  
 0059\_v350\_remove\_adhoc\_limit  
 0060\_v350\_update\_schedule\_uniqueness\_constraint  
 0061\_v350\_track\_native\_credentialtype\_source  
 0062\_v350\_new\_playbook\_stats  
 0063\_v350\_org\_host\_limits  
 0064\_v350\_analytics\_state  
 0065\_v350\_index\_job\_status  
 0066\_v350\_inventorysource\_custom\_virtualenv  
 0067\_v350\_credential\_plugins  
 0068\_v350\_index\_event\_created  
 0069\_v350\_generate\_unique\_install\_uuid  
 0070\_v350\_gce\_instance\_id  
 0071\_v350\_remove\_system\_tracking  
 0072\_v350\_deprecate\_fields  
 0073\_v360\_create\_instance\_group\_m2m  
 0074\_v360\_migrate\_instance\_group\_relations  
 0075\_v360\_remove\_old\_instance\_group\_relations  
 0076\_v360\_add\_new\_instance\_group\_relations  
 0077\_v360\_add\_default\_orderings  
 0078\_v360\_clear\_sessions\_tokens\_jt  
 0079\_v360\_rm\_implicit\_oauth2\_apps  
 0080\_v360\_replace\_job\_origin  
 0081\_v360\_notify\_on\_start  
 0082\_v360\_webhook\_http\_method  
 0083\_v360\_job\_branch\_override  
 0084\_v360\_token\_description  
 0085\_v360\_add\_notificationtemplate\_messages  
 0086\_v360\_workflow\_approval  
 0087\_v360\_update\_credential\_injector\_help\_text  
 0088\_v360\_dashboard\_optimizations  
 0089\_v360\_new\_job\_event\_types  
 0090\_v360\_WFJT\_prompts  
 0091\_v360\_approval\_node\_notifications  
 0092\_v360\_webhook\_mixin  
 0093\_v360\_personal\_access\_tokens  
 0094\_v360\_webhook\_mixin2  
 0095\_v360\_increase\_instance\_version\_length  
 0096\_v360\_container\_groups  
 0097\_v360\_workflowapproval\_approved\_or\_denied\_by  
 0098\_v360\_rename\_cyberark\_aim\_credential\_type  
 0099\_v361\_license\_cleanup  
 0100\_v370\_projectupdate\_job\_tags  
 0101\_v370\_generate\_new\_uuids\_for\_iso\_nodes  
 0102\_v370\_unifiedjob\_canceled  
 0103\_v370\_remove\_computed\_fields  
 0104\_v370\_cleanup\_old\_scan\_jts  
 0105\_v370\_remove\_jobevent\_parent\_and\_hosts  
 0106\_v370\_remove\_inventory\_groups\_with\_active\_failures  
 0107\_v370\_workflow\_convergence\_api\_toggle  
 0108\_v370\_unifiedjob\_dependencies\_processed  
 0109\_v370\_job\_template\_organization\_field  
 0110\_v370\_instance\_ip\_address  
 0111\_v370\_delete\_channelgroup  
 0112\_v370\_workflow\_node\_identifier  
 0113\_v370\_event\_bigint  
 0114\_v370\_remove\_deprecated\_manual\_inventory\_sources  
 0115\_v370\_schedule\_set\_null  
 0116\_v400\_remove\_hipchat\_notifications  
 0117\_v400\_remove\_cloudforms\_inventory  
 0118\_add\_remote\_archive\_scm\_type  
 0119\_inventory\_plugins  
 0120\_galaxy\_credentials  
 0121\_delete\_toweranalyticsstate  
 0122\_really\_remove\_cloudforms\_inventory  
 0123\_drop\_hg\_support  
 0124\_execution\_environments  
 0125\_more\_ee\_modeling\_changes  
 0126\_executionenvironment\_container\_options  
 0127\_reset\_pod\_spec\_override  
 0128\_organiaztion\_read\_roles\_ee\_admin  
 0129\_unifiedjob\_installed\_collections  
 0130\_ee\_polymorphic\_set\_null  
 0131\_undo\_org\_polymorphic\_ee  
 0132\_instancegroup\_is\_container\_group  
 0133\_centrify\_vault\_credtype  
 0134\_unifiedjob\_ansible\_version  
 0135\_schedule\_sort\_fallback\_to\_id  
 0136\_scm\_track\_submodules  
 0137\_custom\_inventory\_scripts\_removal\_data  
 0138\_custom\_inventory\_scripts\_removal  
 0139\_isolated\_removal  
 0140\_rename  
 0141\_remove\_isolated\_instances  
 0142\_update\_ee\_image\_field\_description  
 0143\_hostmetric  
 0144\_event\_partitions  
 0145\_deregister\_managed\_ee\_objs  
 0146\_add\_insights\_inventory  
 0147\_validate\_ee\_image\_field  
 0148\_unifiedjob\_receptor\_unit\_id  
 0149\_remove\_inventory\_insights\_credential  
 0150\_rename\_inv\_sources\_inv\_updates  
 0151\_rename\_managed\_by\_tower  
 0152\_instance\_node\_type  
 0153\_instance\_last\_seen  
 0154\_set\_default\_uuid  
 0155\_improved\_health\_check  
 0156\_capture\_mesh\_topology  
 0157\_inventory\_labels  
 0158\_make\_instance\_cpu\_decimal  
 0159\_deprecate\_inventory\_source\_UoPU\_field  
 0160\_alter\_schedule\_rrule  
 0161\_unifiedjob\_host\_status\_counts  
 0162\_alter\_unifiedjob\_dependent\_jobs  
 0163\_convert\_job\_tags\_to\_textfield  
 0164\_remove\_inventorysource\_update\_on\_project\_update  
 0165\_task\_manager\_refactor  
 0166\_alter\_jobevent\_host  
 0167\_project\_signature\_validation\_credential  
 0168\_inventoryupdate\_scm\_revision  
 0169\_jt\_prompt\_everything\_on\_launch  
 0170\_node\_and\_link\_state  
 0171\_add\_health\_check\_started  
 0172\_prevent\_instance\_fallback  
 0173\_instancegroup\_max\_limits  
 0174\_ensure\_org\_ee\_admin\_roles  
 0175\_workflowjob\_is\_bulk\_job  
 0176\_inventorysource\_scm\_branch  
 0177\_instance\_group\_role\_addition  
 0178\_instance\_group\_admin\_migration  
 0179\_change\_cyberark\_plugin\_names  
 0180\_add\_hostmetric\_fields  
 0181\_hostmetricsummarymonthly  
 0182\_constructed\_inventory  
 0183\_pre\_django\_upgrade  
**[] 0184\_django\_indexes**  
oauth2\_provider  
 0001\_initial  
 0002\_auto\_20190406\_1805  
 0003\_auto\_20201211\_1314  
 0004\_auto\_20200902\_2022  
 0005\_auto\_20211222\_2352  
sessions  
 0001\_initial  
sites  
 0001\_initial  
 0002\_alter\_domain\_unique  
social\_django  
 0001\_initial (2 squashed migrations)  
 0002\_add\_related\_name (2 squashed migrations)  
 0003\_alter\_email\_max\_length (2 squashed migrations)  
 0004\_auto\_20160423\_0400 (2 squashed migrations)  
 0005\_auto\_20160727\_2333 (1 squashed migrations)  
 0006\_partial  
 0007\_code\_timestamp  
 0008\_partial\_timestamp  
 0009\_auto\_20191118\_0520  
 0010\_uid\_db\_index  
sso  
 0001\_initial  
 0002\_expand\_provider\_options  
 0003\_convert\_saml\_string\_to\_list  
taggit  
 0001\_initial  
 0002\_auto\_20150616\_2121  
 0003\_taggeditem\_add\_unique\_index  
 0004\_alter\_taggeditem\_content\_type\_alter\_taggeditem\_tag  
 0005\_auto\_20220424\_2025

Only 0184\_django\_indexes is failing

**bash-5.1$ awx-manage migrate main**  
Operations to perform:  
Apply all migrations: main  
Running migrations:  
Applying main.0184\_django\_indexes…Traceback (most recent call last):  
File “/usr/bin/awx-manage”, line 8, in  
sys.exit(manage())  
File “/var/lib/awx/venv/awx/lib64/python3.9/site-packages/awx/ **init**.py”, line 200, in manage  
execute\_from\_command\_line(sys.argv)  
File “/var/lib/awx/venv/awx/lib64/python3.9/site-packages/django/core/management/ **init**.py”, line 442, in execute\_from\_command\_line  
utility.execute()  
File “/var/lib/awx/venv/awx/lib64/python3.9/site-packages/django/core/management/ **init**.py”, line 436, in execute  
self.fetch\_command(subcommand).run\_from\_argv(self.argv)  
File “/var/lib/awx/venv/awx/lib64/python3.9/site-packages/django/core/management/base.py”, line 412, in run\_from\_argv  
self.execute(\*args, \*\*cmd\_options)  
File “/var/lib/awx/venv/awx/lib64/python3.9/site-packages/django/core/management/base.py”, line 458, in execute  
output = self.handle(\*args, \*\*options)  
File “/var/lib/awx/venv/awx/lib64/python3.9/site-packages/django/core/management/base.py”, line 106, in wrapper  
res = handle\_func(\*args, \*\*kwargs)  
File “/var/lib/awx/venv/awx/lib64/python3.9/site-packages/django/core/management/commands/migrate.py”, line 356, in handle  
post\_migrate\_state = executor.migrate(  
File “/var/lib/awx/venv/awx/lib64/python3.9/site-packages/django/db/migrations/executor.py”, line 135, in migrate  
state = self.\_migrate\_all\_forwards(  
File “/var/lib/awx/venv/awx/lib64/python3.9/site-packages/django/db/migrations/executor.py”, line 167, in \_migrate\_all\_forwards  
state = self.apply\_migration(  
File “/var/lib/awx/venv/awx/lib64/python3.9/site-packages/django/db/migrations/executor.py”, line 252, in apply\_migration  
state = migration.apply(state, schema\_editor)  
File “/var/lib/awx/venv/awx/lib64/python3.9/site-packages/django/db/migrations/migration.py”, line 132, in apply  
operation.database\_forwards(  
File “/var/lib/awx/venv/awx/lib64/python3.9/site-packages/django/db/migrations/operations/models.py”, line 977, in database\_forwards  
raise ValueError(  
ValueError: Found wrong number (0) of indexes for main\_projectupdateevent(project\_update\_id, job\_created, uuid).

Any ideas?

---

<div class="post-metadata">

**Author:** ![howardjones](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/howardjones/32/4169_2.png) [@howardjones](https://forum.ansible.com/u/howardjones)\
**Post date:** [August 20, 2025, 8:31am UTC](https://forum.ansible.com/t/awx-operator-2-1-0-to-awx-operator-2-2-0-upgrade-fails/4717/2 "2025-08-20T08:31:25Z")

</div>

I’m also running into this while trying to migrate from a rather old AWX 21.7.0 to current, and AWX-managed postgres to an external postgres database. Did you find a resolution?
