-
Notifications
You must be signed in to change notification settings - Fork 13.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deprecate database attribute allow_run_sync (#4961)
* 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
- Loading branch information
1 parent
529cb5c
commit 2931baa
Showing
8 changed files
with
80 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
superset/migrations/versions/a61b40f9f57f_remove_allow_run_sync.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
"""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, | ||
), | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters