mirror of
https://github.com/apache/superset.git
synced 2026-06-05 15:49:27 +00:00
* Deprecate database attribute allow_run_sync There's really 2 modes of operations in SQL Lab, sync or async though currently there are 2 boolean flags: allow_run_sync and allow_run_async, leading to 4 potential combinations, only 2 of which actually makes sense. The original vision is that we'd expose the choice to users and they would decide which `Run` or `Run Async` button to hit. Later on we decided to have a single button and for each database to be either sync or async. This PR cleans up allow_run_sync by removing references to it. * Fix build * Add db migration * using batch_op
30 lines
587 B
Python
30 lines
587 B
Python
"""remove allow_run_sync
|
|
|
|
Revision ID: a61b40f9f57f
|
|
Revises: 46f444d8b9b7
|
|
Create Date: 2018-11-27 11:53:17.512627
|
|
|
|
"""
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision = 'a61b40f9f57f'
|
|
down_revision = '46f444d8b9b7'
|
|
|
|
|
|
def upgrade():
|
|
with op.batch_alter_table('dbs') as batch_op:
|
|
batch_op.drop_column('allow_run_sync')
|
|
|
|
|
|
def downgrade():
|
|
op.add_column(
|
|
'dbs',
|
|
sa.Column(
|
|
'allow_run_sync',
|
|
sa.Integer(display_width=1),
|
|
autoincrement=False, nullable=True,
|
|
),
|
|
)
|