Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent Migration History after upgrade to NB2.0 #234

Closed
JimmyKip opened this issue Oct 5, 2023 · 3 comments
Closed

Inconsistent Migration History after upgrade to NB2.0 #234

JimmyKip opened this issue Oct 5, 2023 · 3 comments

Comments

@JimmyKip
Copy link

JimmyKip commented Oct 5, 2023

Environment

  • Python version: 3.11
  • Nautobot version: 2.0.1
  • nautobot-plugin-device-lifecycle-mgmt version: 2.0.0

Expected Behavior

Nautobot 2.0.1 to start successfully after adding Device Lifecycle Management Plugin to image.

Observed Behavior

Received Inconsistent Migration Error as Nautobot launched:

django.db.migrations.exceptions.InconsistentMigrationHistory: Migration dcim.0031_remove_device_role_and_rack_role is applied before its dependency nautobot_device_lifecycle_mgmt.0016_role_migration_cleanup on database 'default'.

Steps to Reproduce

  1. Install Device Lifecycle Management 1.3.2 in < 2.0 Nautobot
  2. Upgrade Nautobot to 2.0.1 with no plugins installed or enabled
  3. Install & enable Device Lifecycle Management 2.0.0 in Nautobot 2.0.1
  4. Receive DB error on launch, NB goes into crash loop waiting for DB.
@glennmatthews
Copy link

Related: nautobot/nautobot#4609. Broadly speaking the workflow for upgrading to 2.0 looks likely to require that the apps you had enabled in 1.x remain enabled during the upgrade, rather than enabling them after the upgrade is completed, but we're looking into whether we can make improvements in this regard.

@JimmyKip
Copy link
Author

JimmyKip commented Oct 5, 2023

Cheers Glenn, that makes sense.

@glennmatthews
Copy link

Fixed by #236, needs a new release though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants