forked from apache/superset
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update annotation model to have JSON Metadata field (apache#5745)
* add column to annotation model * update migration file * change to Text * remove old migration file * add migration file * remove JSON * add new column to view * add comma back * linting * lint some more * missing comma * rename columns * add degrade and new migration file * update version * fixe changed name * remove json from list columns (cherry picked from commit 5e3f833)
- Loading branch information
1 parent
15c6cc8
commit c3db769
Showing
3 changed files
with
32 additions
and
1 deletion.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
superset/migrations/versions/55e910a74826_add_metadata_column_to_annotation_model_.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,22 @@ | ||
"""add_metadata_column_to_annotation_model.py | ||
Revision ID: 55e910a74826 | ||
Revises: 1a1d627ebd8e | ||
Create Date: 2018-08-29 14:35:20.407743 | ||
""" | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = '55e910a74826' | ||
down_revision = '1a1d627ebd8e' | ||
|
||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
|
||
def upgrade(): | ||
op.add_column('annotation', sa.Column('json_metadata', sa.Text(), nullable=True)) | ||
|
||
|
||
def downgrade(): | ||
op.drop_column('annotation', 'json_metadata') |
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