nautobot / nautobot-app-version-control

Version Control App that uses and requires a Dolt Database
Other
29 stars 6 forks source link

Dolt issues with Nautobot v2 upgrade #207

Closed lampwins closed 5 months ago

lampwins commented 6 months ago

Dolt is unable to process the dcim.0040 migration which drops the dcim_region table. This appears to be because it does not like the presence of a self referential foreign key constraint of parent_id -> id within the table.

nautobot-1  |   Applying dcim.0040_remove_region_and_site...Traceback (most recent call last):
nautobot-1  |   File "/usr/local/lib/python3.11/site-packages/django/db/backends/utils.py", line 84, in _execute
nautobot-1  |     return self.cursor.execute(sql, params)
nautobot-1  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
nautobot-1  |   File "/usr/local/lib/python3.11/site-packages/django/db/backends/mysql/base.py", line 73, in execute
nautobot-1  |     return self.cursor.execute(query, args)
nautobot-1  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
nautobot-1  |   File "/usr/local/lib/python3.11/site-packages/MySQLdb/cursors.py", line 179, in execute
nautobot-1  |     res = self._query(mogrified_query)
nautobot-1  |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
nautobot-1  |   File "/usr/local/lib/python3.11/site-packages/MySQLdb/cursors.py", line 330, in _query
nautobot-1  |     db.query(q)
nautobot-1  |   File "/usr/local/lib/python3.11/site-packages/MySQLdb/connections.py", line 257, in query
nautobot-1  |     _mysql.connection.query(self, query)
nautobot-1  | MySQLdb.OperationalError: (1105, 'cannot drop table `dcim_region` as it is referenced in foreign key `dcim_region_parent_id_2486f5d4_fk_dcim_region_id`')
lampwins commented 6 months ago

Dolt version 1.32.3 using the mysql client.

timsehn commented 6 months ago

Dolt here. We will reproduce this, make a Dolt issue, and fix it ASAP. Thanks to Ken for letting us know. Issue coming soon.

timsehn commented 6 months ago

https://github.com/dolthub/dolt/issues/7418

We'll try and get this fixed and released today.

timsehn commented 6 months ago

This is fixed in 1.32.4 just released

timsehn commented 6 months ago

Can you confirm fix?

lampwins commented 5 months ago

@timsehn it works! Thank you for the super fast turn around!