mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-01 04:10:06 -05:00
updated to handle sqlite
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
# Generated by Django 3.1.7 on 2021-04-07 20:00
|
||||
|
||||
from django.conf import settings
|
||||
from django.contrib.postgres.indexes import GinIndex
|
||||
from django.contrib.postgres.search import SearchVectorField, SearchVector
|
||||
from django.db import migrations
|
||||
@@ -8,6 +8,8 @@ from cookbook.models import Recipe
|
||||
|
||||
|
||||
def set_default_search_vector(apps, schema_editor):
|
||||
if settings.DATABASES['default']['ENGINE'] not in ['django.db.backends.postgresql_psycopg2', 'django.db.backends.postgresql']:
|
||||
return
|
||||
with scopes_disabled():
|
||||
search_vector = (
|
||||
SearchVector('name', weight='A')
|
||||
@@ -16,11 +18,9 @@ def set_default_search_vector(apps, schema_editor):
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('cookbook', '0118_auto_20210406_1805'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='recipe',
|
||||
Reference in New Issue
Block a user