Skip to content

Commit abbd4d3

Browse files
authored
Create sqlalchemy_searchable expressions (#6491)
The required sql expressions for sqlalchemy_searchable are only created on the sqlalchemy pre_create hook. When upgrading from a previous redash version no CREATE statements may be run, so these expressions are never created. Add a migration to manually execute the sql_expressions DDL from sqlalchemy_searchable.
1 parent 1d35085 commit abbd4d3

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
"""create sqlalchemy_searchable expressions
2+
3+
Revision ID: 7ce5925f832b
4+
Revises: 1038c2174f5d
5+
Create Date: 2023-09-29 16:48:29.517762
6+
7+
"""
8+
from alembic import op
9+
import sqlalchemy as sa
10+
from sqlalchemy_searchable import sql_expressions
11+
12+
13+
# revision identifiers, used by Alembic.
14+
revision = '7ce5925f832b'
15+
down_revision = '1038c2174f5d'
16+
branch_labels = None
17+
depends_on = None
18+
19+
20+
def upgrade():
21+
op.execute(sql_expressions)
22+
23+
24+
def downgrade():
25+
pass

0 commit comments

Comments
 (0)