Skip to content

Commit

Permalink
Run reindex command in migration
Browse files Browse the repository at this point in the history
  • Loading branch information
yohanboniface committed Jun 19, 2016
1 parent 4972d73 commit baffc62
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ideascube/search/migrations/0002_reindex.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
from __future__ import unicode_literals

from django.db import migrations
from ideascube.search.utils import create_index_table
from django.core.management import call_command

reindex = lambda *args: create_index_table(force=True)

def reindex(*args):
call_command('reindex')


class Migration(migrations.Migration):
Expand Down

0 comments on commit baffc62

Please sign in to comment.