Migration of pgsql django.db.utils.ProgrammingError: permission denied for table django_migrations #7338

Closed
opened 2025-12-29 20:22:05 +01:00 by adam · 0 comments
Owner

Originally created by @atdcode on GitHub (Dec 9, 2022).

NetBox version

3.3.9

Python version

3.9

Steps to Reproduce

  1. After a fresh install of netbox 3.3.9 on debian 11 with pgsql (14.6-1.pgdg110+1)
  2. sudo -u postgres psql -c 'drop database netbox'
  3. sudo -u postgres psql -c 'drop database netbox'
  4. sudo -u postgres psql -c 'grant all privileges on database netbox to netbox
  5. sudo -u postgres psql netbox < my_pgsql14_netbox.sql
  6. source /opt/netbox/venv/bin/activate
  7. cd /opt/netbox/netbox
  8. python3 manage.py migrate
  9. django.db.utils.ProgrammingError: permission denied for table django_migrations

Expected Behavior

a clean import

Observed Behavior

Trying to import a pgsql 14 database in a fresh install of netbox.

Originally created by @atdcode on GitHub (Dec 9, 2022). ### NetBox version 3.3.9 ### Python version 3.9 ### Steps to Reproduce 1. After a fresh install of netbox 3.3.9 on debian 11 with pgsql (14.6-1.pgdg110+1) 2. sudo -u postgres psql -c 'drop database netbox' 3. sudo -u postgres psql -c 'drop database netbox' 4. sudo -u postgres psql -c 'grant all privileges on database netbox to netbox 5. sudo -u postgres psql netbox < my_pgsql14_netbox.sql 6. source /opt/netbox/venv/bin/activate 7. cd /opt/netbox/netbox 8. python3 [manage.py](https://manage.py/) migrate 9. django.db.utils.ProgrammingError: permission denied for table django_migrations ### Expected Behavior a clean import ### Observed Behavior Trying to import a pgsql 14 database in a fresh install of netbox.
adam closed this issue 2025-12-29 20:22:05 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#7338