-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SearchQuery: use BigAutoField for primary key (#9671)
* SearchQuery: use BigAutoField for primary key We have 5M records, so migration shouldn't take that long (1-2 min?), and we use a task to create the records, so this shouldn't affect search. ```python In [1]: SearchQuery.objects.count() Out[1]: 5062590 ``` Ref #9492 * Linter
- Loading branch information
Showing
2 changed files
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
readthedocs/search/migrations/0005_alter_searchquery_id.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Generated by Django 3.2.15 on 2022-10-18 15:43 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("search", "0004_make_total_results_not_null"), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name="searchquery", | ||
name="id", | ||
field=models.BigAutoField( | ||
auto_created=True, primary_key=True, serialize=False, verbose_name="ID" | ||
), | ||
), | ||
] |