You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by be...@apache.org on 2018/12/28 20:41:21 UTC
[incubator-superset] branch master updated: Using batch_op in db
migration 0b1f1ab473c0 (#6581)
This is an automated email from the ASF dual-hosted git repository.
beto pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git
The following commit(s) were added to refs/heads/master by this push:
new 6099519 Using batch_op in db migration 0b1f1ab473c0 (#6581)
6099519 is described below
commit 609951989600757923d48de9acf984be1718817a
Author: Maxime Beauchemin <ma...@gmail.com>
AuthorDate: Fri Dec 28 12:41:11 2018 -0800
Using batch_op in db migration 0b1f1ab473c0 (#6581)
As I needed to downgrade from db migration 0b1f1ab473c0, I realized I
needed to use batch_op against SQLLite.
---
.../migrations/versions/0b1f1ab473c0_add_extra_column_to_query.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/superset/migrations/versions/0b1f1ab473c0_add_extra_column_to_query.py b/superset/migrations/versions/0b1f1ab473c0_add_extra_column_to_query.py
index 2c14643..eee48f4 100644
--- a/superset/migrations/versions/0b1f1ab473c0_add_extra_column_to_query.py
+++ b/superset/migrations/versions/0b1f1ab473c0_add_extra_column_to_query.py
@@ -14,8 +14,10 @@ down_revision = '55e910a74826'
def upgrade():
- op.add_column('query', sa.Column('extra_json', sa.Text(), nullable=True))
+ with op.batch_alter_table('query') as batch_op:
+ batch_op.add_column(sa.Column('extra_json', sa.Text(), nullable=True))
def downgrade():
- op.drop_column('query', 'extra_json')
+ with op.batch_alter_table('query') as batch_op:
+ batch_op.drop_column('extra_json')