Skip to content

Commit

Permalink
Fix: triggers not created for queries.search_vector (#3634)
Browse files Browse the repository at this point in the history
  • Loading branch information
arikfr committed Mar 24, 2019
1 parent ff0967f commit 4a978ba
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
@@ -1,5 +1,6 @@
import time

import sqlalchemy
from flask.cli import AppGroup
from flask_migrate import stamp
from sqlalchemy.exc import DatabaseError
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 4a978ba

Please sign in to comment.