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

Plugin removal #149

Closed
thefreakquency opened this issue Jan 17, 2022 · 5 comments
Closed

Plugin removal #149

thefreakquency opened this issue Jan 17, 2022 · 5 comments

Comments

@thefreakquency
Copy link

thefreakquency commented Jan 17, 2022

Environment

  • Python version: 3.8.5
  • NetBox version: 3.1.2
  • ntc-netbox-plugin-onboarding version: 2.2.0

Proposed Functionality

I upgraded my Netbox instance to 3.1.2. As I knew that the onboarding plugin was not supported ( #142 ), hence I did not had it activated. Everything was OK, except when trying to delete a device:

<class 'django.db.utils.IntegrityError'>

update or delete on table "dcim_device" violates foreign key constraint "netbox_onboarding_on_device_id_cee3ef7b_fk_dcim_devi" on table "netbox_onboarding_onboardingdevice"
DETAIL:  Key (id)=(2659) is still referenced from table "netbox_onboarding_onboardingdevice".


Python version: 3.8.5
NetBox version: 3.1.2

I would like to have either an uninstall procedure document or script to remove these database references until the onboarding plugin is compatible with Netbox 3.x (Can`t wait to reinstall!)

Use Case

@mzbroch
Copy link
Contributor

mzbroch commented Jan 17, 2022

Zeroing migrations will delete plugin related data:

python manage.py migrate netbox_onboarding zero

@thefreakquency
Copy link
Author

Thanks for that fast reply! Unfortunately, as it is not installed in my 3.x Netbox instance I get the following error message:
CommandError: No installed app with label 'netbox_onboarding'.
:(

@mzbroch
Copy link
Contributor

mzbroch commented Jan 17, 2022

You might consider manual procedure of removing the tables and migrations, or temporarily install plugin and zeroize migrations as per my comment.

@thefreakquency
Copy link
Author

I guess I will have no choice but to remove tables from database as I cannot install the plugin on Netbox 3.x... Is such procedure documented somewhere or I have to reverse engineer the database?

@thefreakquency
Copy link
Author

Nevermind, I dropped the 2 onboarding plugin tables, and it fixed the issue. Thanks! :)

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