mirror of
https://github.com/netbox-community/netbox.git
synced 2026-02-05 14:56:24 -06:00
Closes #8454: Set DEFAULT_AUTO_FIELD to BigAutoField
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('users', '0001_squashed_0011'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='objectpermission',
|
||||
name='id',
|
||||
field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='token',
|
||||
name='id',
|
||||
field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='userconfig',
|
||||
name='id',
|
||||
field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False),
|
||||
),
|
||||
]
|
||||
@@ -11,7 +11,6 @@ from django.dispatch import receiver
|
||||
from django.utils import timezone
|
||||
|
||||
from netbox.config import get_config
|
||||
from netbox.models import BigIDModel
|
||||
from utilities.querysets import RestrictedQuerySet
|
||||
from utilities.utils import flatten_dict
|
||||
from .constants import *
|
||||
@@ -187,7 +186,7 @@ def create_userconfig(instance, created, **kwargs):
|
||||
# REST API
|
||||
#
|
||||
|
||||
class Token(BigIDModel):
|
||||
class Token(models.Model):
|
||||
"""
|
||||
An API token used for user authentication. This extends the stock model to allow each user to have multiple tokens.
|
||||
It also supports setting an expiration time and toggling write ability.
|
||||
@@ -246,7 +245,7 @@ class Token(BigIDModel):
|
||||
# Permissions
|
||||
#
|
||||
|
||||
class ObjectPermission(BigIDModel):
|
||||
class ObjectPermission(models.Model):
|
||||
"""
|
||||
A mapping of view, add, change, and/or delete permission for users and/or groups to an arbitrary set of objects
|
||||
identified by ORM query parameters.
|
||||
|
||||
Reference in New Issue
Block a user