Skip to content

Commit

Permalink
Make BigAutoField as default auto field
Browse files Browse the repository at this point in the history
  • Loading branch information
Eg0ra committed Dec 6, 2024
1 parent 6ea21d4 commit 10b70cf
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 6 deletions.
1 change: 1 addition & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ UNRELEASED

* Fixed display of progress bar when task is waiting to run (https://github.com/saritasa-nest/django-import-export-extensions/issues/68)
* Improve progress bar style (https://github.com/saritasa-nest/django-import-export-extensions/issues/72)
* Set `default_auto_field` for `import-export-extensions` app to `django.db.models.BigAutoField` (https://github.com/saritasa-nest/django-import-export-extensions/issues/69)

1.0.1 (2024-11-08)
------------------
Expand Down
1 change: 1 addition & 0 deletions import_export_extensions/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ class CeleryImportExport(AppConfig):

name = "import_export_extensions"
verbose_name = _("Celery Import/Export")
default_auto_field = "django.db.models.BigAutoField"

def ready(self):
"""Set up default settings."""
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Generated by Django 5.1.3 on 2024-12-05 07:16

from django.db import migrations, models


class Migration(migrations.Migration):
dependencies = [
(
"import_export_extensions",
"0007_alter_exportjob_result_alter_importjob_result",
),
]

operations = [
migrations.AlterField(
model_name="exportjob",
name="id",
field=models.BigAutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
migrations.AlterField(
model_name="importjob",
name="id",
field=models.BigAutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
]
10 changes: 5 additions & 5 deletions test_project/fake_app/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by Django 5.1.1 on 2024-10-14 08:56
# Generated by Django 5.1.3 on 2024-12-05 07:52

import django.db.models.deletion
from django.db import migrations, models
Expand All @@ -15,7 +15,7 @@ class Migration(migrations.Migration):
fields=[
(
"id",
models.AutoField(
models.BigAutoField(
auto_created=True,
primary_key=True,
serialize=False,
Expand All @@ -34,7 +34,7 @@ class Migration(migrations.Migration):
fields=[
(
"id",
models.AutoField(
models.BigAutoField(
auto_created=True,
primary_key=True,
serialize=False,
Expand All @@ -53,7 +53,7 @@ class Migration(migrations.Migration):
fields=[
(
"id",
models.AutoField(
models.BigAutoField(
auto_created=True,
primary_key=True,
serialize=False,
Expand Down Expand Up @@ -89,7 +89,7 @@ class Migration(migrations.Migration):
fields=[
(
"id",
models.AutoField(
models.BigAutoField(
auto_created=True,
primary_key=True,
serialize=False,
Expand Down
2 changes: 1 addition & 1 deletion test_project/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
CELERY_BACKEND = "redis://redis/1"
CELERY_TASK_DEFAULT_QUEUE = "development"

DEFAULT_AUTO_FIELD = "django.db.models.AutoField"
DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField"

if DEBUG:
INSTALLED_APPS += ("debug_toolbar",)
Expand Down

0 comments on commit 10b70cf

Please sign in to comment.