Skip to content

Commit

Permalink
Update 0033_job_search_vector_job_website_job_search__0dd667_gin.py
Browse files Browse the repository at this point in the history
  • Loading branch information
QA2A authored Oct 25, 2024
1 parent fc2f334 commit b2b44e1
Showing 1 changed file with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
# Generated by Django 4.2.2 on 2023-07-15 21:52

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


class Migration(migrations.Migration):
Expand All @@ -14,12 +10,15 @@ class Migration(migrations.Migration):
migrations.AddField(
model_name="job",
name="search_vector",
field=django.contrib.postgres.search.SearchVectorField(null=True),
field=models.TextField(null=True), # Replacing SearchVectorField with TextField
),
migrations.AddIndex(
model_name="job",
index=django.contrib.postgres.indexes.GinIndex(
fields=["search_vector"], name="website_job_search__0dd667_gin"
),
index=models.Index(
fields=["search_vector"], name="website_job_search_vector_idx"
), # Replace GinIndex with Index
),
migrations.RunSQL(
"ALTER TABLE website_job ADD FULLTEXT(search_vector);"
), # Adding FULLTEXT index for MySQL
]

0 comments on commit b2b44e1

Please sign in to comment.