Skip to content

Commit

Permalink
AppConfig: Changed default_auto_field to "django.db.models.BigAutoFie…
Browse files Browse the repository at this point in the history
…ld" + added migrations.

(Support more than 2**31 records in all models).
  • Loading branch information
uri-rodberg authored and jefftriplett committed Sep 27, 2023
1 parent 8ad1fd8 commit 7139b07
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
2 changes: 1 addition & 1 deletion friendship/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@


class FriendshipConfig(AppConfig):
default_auto_field = "django.db.models.AutoField"
default_auto_field = "django.db.models.BigAutoField"
name = "friendship"
33 changes: 33 additions & 0 deletions friendship/migrations/0005_auto_20211005_1716.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Generated by Django 3.2.6 on 2021-10-05 14:16

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('friendship', '0004_auto_20200408_1844'),
]

operations = [
migrations.AlterField(
model_name='block',
name='id',
field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
),
migrations.AlterField(
model_name='follow',
name='id',
field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
),
migrations.AlterField(
model_name='friend',
name='id',
field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
),
migrations.AlterField(
model_name='friendshiprequest',
name='id',
field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
),
]

0 comments on commit 7139b07

Please sign in to comment.