mirror of
https://github.com/getredash/redash.git
synced 2025-12-19 17:37:19 -05:00
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.
This commit is contained in:
@@ -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
|
||||||
Reference in New Issue
Block a user