Skip to content

Commit

Permalink
Fix: triggers not created for queries.search_vector (#3631)
Browse files Browse the repository at this point in the history
  • Loading branch information
arikfr authored Mar 24, 2019
1 parent e712c19 commit 173f9ba
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions redash/cli/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from flask.cli import AppGroup
from flask_migrate import stamp
import sqlalchemy
from sqlalchemy.exc import DatabaseError

manager = AppGroup(help="Manage the database (create/drop tables).")
Expand All @@ -25,6 +26,8 @@ def create_tables():
from redash.models import db

_wait_for_db_connection(db)
# To create triggers for searchable models, we need to call configure_mappers().
sqlalchemy.orm.configure_mappers()
db.create_all()

# Need to mark current DB as up to date
Expand Down

0 comments on commit 173f9ba

Please sign in to comment.