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.
Import / export of the dashboards. (apache#1197)
* Implement import / export dashboard functionality. * Address comments from discussion. * Add function descriptions. * Minor fixes * Fix tests for python 3. * Export datasources. * Implement tables import. * Json.loads does not support trailing commas. * Improve alter_dict func * Resolve comments. * Refactor tests * Move params_dict and alter_params to the ImportMixin * Fix flask menues.
- Loading branch information
Showing
10 changed files
with
827 additions
and
26 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
28 changes: 28 additions & 0 deletions
28
caravel/migrations/versions/b46fa1b0b39e_add_params_to_tables.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,28 @@ | ||
"""Add json_metadata to the tables table. | ||
Revision ID: b46fa1b0b39e | ||
Revises: ef8843b41dac | ||
Create Date: 2016-10-05 11:30:31.748238 | ||
""" | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = 'b46fa1b0b39e' | ||
down_revision = 'ef8843b41dac' | ||
|
||
from alembic import op | ||
import logging | ||
import sqlalchemy as sa | ||
|
||
|
||
def upgrade(): | ||
op.add_column('tables', | ||
sa.Column('params', sa.Text(), nullable=True)) | ||
|
||
|
||
def downgrade(): | ||
try: | ||
op.drop_column('tables', 'params') | ||
except Exception as e: | ||
logging.warning(str(e)) | ||
|
Oops, something went wrong.