mirror of
https://github.com/netbox-community/netbox.git
synced 2025-12-09 01:49:35 -06:00
Closes #20341: Drop legacy django_admin_log table (#20349)
Some checks failed
CI / build (20.x, 3.10) (push) Has been cancelled
CI / build (20.x, 3.11) (push) Has been cancelled
CI / build (20.x, 3.12) (push) Has been cancelled
CodeQL / Analyze (${{ matrix.language }}) (none, actions) (push) Has been cancelled
CodeQL / Analyze (${{ matrix.language }}) (none, javascript-typescript) (push) Has been cancelled
CodeQL / Analyze (${{ matrix.language }}) (none, python) (push) Has been cancelled
Some checks failed
CI / build (20.x, 3.10) (push) Has been cancelled
CI / build (20.x, 3.11) (push) Has been cancelled
CI / build (20.x, 3.12) (push) Has been cancelled
CodeQL / Analyze (${{ matrix.language }}) (none, actions) (push) Has been cancelled
CodeQL / Analyze (${{ matrix.language }}) (none, javascript-typescript) (push) Has been cancelled
CodeQL / Analyze (${{ matrix.language }}) (none, python) (push) Has been cancelled
This commit is contained in:
parent
2a99aadc5d
commit
2dac09cea0
22
netbox/users/migrations/0012_drop_django_admin_log_table.py
Normal file
22
netbox/users/migrations/0012_drop_django_admin_log_table.py
Normal file
@ -0,0 +1,22 @@
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
dependencies = [
|
||||
('users', '0011_concrete_objecttype'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
# Django admin UI was removed in NetBox v4.0
|
||||
# Older installations may still have the old `django_admin_log` table in place
|
||||
# Drop the obsolete table if it exists. This is a no-op on fresh or already-clean DBs.
|
||||
migrations.RunSQL(
|
||||
sql='DROP TABLE IF EXISTS "django_admin_log";',
|
||||
reverse_sql=migrations.RunSQL.noop,
|
||||
),
|
||||
# Clean up a potential leftover sequence in older DBs
|
||||
migrations.RunSQL(
|
||||
sql='DROP SEQUENCE IF EXISTS "django_admin_log_id_seq";',
|
||||
reverse_sql=migrations.RunSQL.noop,
|
||||
),
|
||||
]
|
||||
Loading…
Reference in New Issue
Block a user