forked from apache/superset
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Check datasource level perms for downloading csv and fetching results (…
…apache#2032) * Check datasource level perms for downloading csv and fetching results * Add index on the query table on the result key column
- Loading branch information
Showing
3 changed files
with
58 additions
and
33 deletions.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
superset/migrations/versions/f18570e03440_add_query_result_key_index.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,20 @@ | ||
"""Add index on the result key to the query table. | ||
Revision ID: f18570e03440 | ||
Revises: 1296d28ec131 | ||
Create Date: 2017-01-24 12:40:42.494787 | ||
""" | ||
from alembic import op | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = 'f18570e03440' | ||
down_revision = '1296d28ec131' | ||
|
||
|
||
def upgrade(): | ||
op.create_index(op.f('ix_query_results_key'), 'query', ['results_key'], unique=False) | ||
|
||
|
||
def downgrade(): | ||
op.drop_index(op.f('ix_query_results_key'), table_name='query') |
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