Skip to content

Commit

Permalink
Create sqlalchemy_searchable expressions (#6491)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
azundo authored Oct 12, 2023
1 parent 1d35085 commit abbd4d3
Showing 1 changed file with 25 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
"""create sqlalchemy_searchable expressions
Revision ID: 7ce5925f832b
Revises: 1038c2174f5d
Create Date: 2023-09-29 16:48:29.517762
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy_searchable import sql_expressions


# revision identifiers, used by Alembic.
revision = '7ce5925f832b'
down_revision = '1038c2174f5d'
branch_labels = None
depends_on = None


def upgrade():
op.execute(sql_expressions)


def downgrade():
pass

0 comments on commit abbd4d3

Please sign in to comment.