From 7b5b602e962c20fc745909994075c7bbdc54d8e5 Mon Sep 17 00:00:00 2001 From: x4base Date: Sat, 30 Apr 2016 23:30:40 +0800 Subject: [PATCH] Use batch_alter_table to drop column in the migration script (#406) --- .../versions/c3a8f8611885_materializing_permission.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/caravel/migrations/versions/c3a8f8611885_materializing_permission.py b/caravel/migrations/versions/c3a8f8611885_materializing_permission.py index 33084ffea94da..1d65a172a4fa6 100644 --- a/caravel/migrations/versions/c3a8f8611885_materializing_permission.py +++ b/caravel/migrations/versions/c3a8f8611885_materializing_permission.py @@ -30,4 +30,6 @@ def upgrade(): def downgrade(): - op.drop_column('slices', 'perm') + # Use batch_alter_table because dropping columns is not supported in SQLite + with op.batch_alter_table('slices') as batch_op: + batch_op.drop_column('perm')