Skip to content

Commit

Permalink
clean up code
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-gray-tangent committed Jul 25, 2024
1 parent 670c4ff commit c22210b
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions app/general/migrations/0012_alter_documentfile_search_vector.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
# Generated by Django 5.0.6 on 2024-07-24 12:00

import django.contrib.postgres.search
from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('general', '0011_alter_documentfile_options_and_more'),
]
Expand All @@ -14,14 +11,22 @@ class Migration(migrations.Migration):
migrations.RemoveField(
model_name='documentfile',
name='search_vector',
), # also deletes `search_vector_trigger` and general_doc_search__752b22_gin
), # also deletes `search_vector_trigger` and general_doc_search__752b22_gin
migrations.AddField(
model_name='documentfile',
name='search_vector',
field=models.GeneratedField(db_persist=True, expression=django.contrib.postgres.search.CombinedSearchVector(django.contrib.postgres.search.CombinedSearchVector(django.contrib.postgres.search.SearchVector('title', config='english', weight='A'), '||', django.contrib.postgres.search.SearchVector('description', config='english', weight='B'), django.contrib.postgres.search.SearchConfig('english')), '||', django.contrib.postgres.search.SearchVector('document_data', config='english', weight='C'), django.contrib.postgres.search.SearchConfig('english')), null=True, output_field=django.contrib.postgres.search.SearchVectorField()),
field=models.GeneratedField(db_persist=True, expression=django.contrib.postgres.search.CombinedSearchVector(
django.contrib.postgres.search.CombinedSearchVector(
django.contrib.postgres.search.SearchVector('title', config='english', weight='A'), '||',
django.contrib.postgres.search.SearchVector('description', config='english', weight='B'),
django.contrib.postgres.search.SearchConfig('english')), '||',
django.contrib.postgres.search.SearchVector('document_data', config='english', weight='C'),
django.contrib.postgres.search.SearchConfig('english')), null=True,
output_field=django.contrib.postgres.search.SearchVectorField()),
),
migrations.AddIndex(
model_name='documentfile',
index=django.contrib.postgres.indexes.GinIndex(fields=['search_vector'], name='general_doc_search__752b22_gin'),
index=django.contrib.postgres.indexes.GinIndex(fields=['search_vector'],
name='general_doc_search__752b22_gin'),
),
]

0 comments on commit c22210b

Please sign in to comment.