From e37b83a21a960c9027adae35049ec916adb74a70 Mon Sep 17 00:00:00 2001 From: timifasubaa <30888507+timifasubaa@users.noreply.github.com> Date: Thu, 11 Oct 2018 14:22:56 -0700 Subject: [PATCH] remove future imports from db migrations (#6063) --- superset/migrations/env.py | 2 -- .../1226819ee0e3_fix_wrong_constraint_on_table_columns.py | 5 ----- .../migrations/versions/130915240929_is_sqllab_viz_flow.py | 4 ---- .../versions/18e88e1cc004_making_audit_nullable.py | 5 ----- superset/migrations/versions/1d2ddd543133_log_dt.py | 5 ----- superset/migrations/versions/1d9e835a84f9_.py | 5 ----- .../migrations/versions/21e88bc06c02_annotation_migration.py | 4 ---- .../versions/289ce07647b_add_encrypted_password_field.py | 4 ---- superset/migrations/versions/2fcdcb35e487_saved_queries.py | 5 ----- .../migrations/versions/33d996bcc382_update_slice_model.py | 4 ---- .../3dda56f1c4c6_migrate_num_period_compare_and_period_.py | 2 -- .../versions/41f6a59a61f2_database_options_for_sql_lab.py | 4 ---- superset/migrations/versions/430039611635_log_more.py | 5 ----- .../migrations/versions/4fa88fe24e94_owners_many_to_many.py | 5 ----- superset/migrations/versions/5ccf602336a0_.py | 5 ----- superset/migrations/versions/6414e83d82b7_.py | 5 ----- superset/migrations/versions/705732c70154_.py | 5 ----- superset/migrations/versions/836c0bf75904_cache_timeouts.py | 5 ----- .../867bf4f117f9_adding_extra_field_to_database_model.py | 5 ----- superset/migrations/versions/8e80a26a31db_.py | 5 ----- .../migrations/versions/956a063c52b3_adjusting_key_length.py | 5 ----- .../versions/a6c18f869a4e_query_start_running_time.py | 5 ----- .../versions/a9c47e2c1547_add_impersonate_user_to_dbs.py | 5 ----- superset/migrations/versions/b347b202819b_.py | 5 ----- .../versions/b4456560d4f3_change_table_unique_constraint.py | 4 ---- .../versions/bf706ae5eb46_cal_heatmap_metric_to_metrics.py | 5 ----- .../versions/c3a8f8611885_materializing_permission.py | 5 ----- superset/migrations/versions/c9495751e314_.py | 5 ----- superset/migrations/versions/d6db5a5cdb5d_.py | 5 ----- .../migrations/versions/e46f2d27a08e_materialize_perms.py | 5 ----- superset/migrations/versions/ef8843b41dac_.py | 5 ----- 31 files changed, 143 deletions(-) diff --git a/superset/migrations/env.py b/superset/migrations/env.py index b9325dc168678..55ee177063fc6 100755 --- a/superset/migrations/env.py +++ b/superset/migrations/env.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- # pylint: disable=C,R,W -from __future__ import with_statement - import logging from logging.config import fileConfig diff --git a/superset/migrations/versions/1226819ee0e3_fix_wrong_constraint_on_table_columns.py b/superset/migrations/versions/1226819ee0e3_fix_wrong_constraint_on_table_columns.py index a7682efe47b32..1aa2018e83806 100644 --- a/superset/migrations/versions/1226819ee0e3_fix_wrong_constraint_on_table_columns.py +++ b/superset/migrations/versions/1226819ee0e3_fix_wrong_constraint_on_table_columns.py @@ -6,11 +6,6 @@ Create Date: 2016-05-27 15:03:32.980343 """ -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function -from __future__ import unicode_literals - # revision identifiers, used by Alembic. revision = '1226819ee0e3' down_revision = '956a063c52b3' diff --git a/superset/migrations/versions/130915240929_is_sqllab_viz_flow.py b/superset/migrations/versions/130915240929_is_sqllab_viz_flow.py index 9e95c7a83ffbe..4d8554cc36f3e 100644 --- a/superset/migrations/versions/130915240929_is_sqllab_viz_flow.py +++ b/superset/migrations/versions/130915240929_is_sqllab_viz_flow.py @@ -5,10 +5,6 @@ Create Date: 2018-04-03 08:19:34.098789 """ -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function -from __future__ import unicode_literals from alembic import op import sqlalchemy as sa from sqlalchemy.ext.declarative import declarative_base diff --git a/superset/migrations/versions/18e88e1cc004_making_audit_nullable.py b/superset/migrations/versions/18e88e1cc004_making_audit_nullable.py index 0696290241244..5dae55b3a8087 100644 --- a/superset/migrations/versions/18e88e1cc004_making_audit_nullable.py +++ b/superset/migrations/versions/18e88e1cc004_making_audit_nullable.py @@ -6,11 +6,6 @@ Create Date: 2016-03-13 21:30:24.833107 """ -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function -from __future__ import unicode_literals - from alembic import op import sqlalchemy as sa diff --git a/superset/migrations/versions/1d2ddd543133_log_dt.py b/superset/migrations/versions/1d2ddd543133_log_dt.py index e46815056b238..9c46ef96817a0 100644 --- a/superset/migrations/versions/1d2ddd543133_log_dt.py +++ b/superset/migrations/versions/1d2ddd543133_log_dt.py @@ -6,11 +6,6 @@ Create Date: 2016-03-25 14:35:44.642576 """ -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function -from __future__ import unicode_literals - # revision identifiers, used by Alembic. revision = '1d2ddd543133' down_revision = 'd2424a248d63' diff --git a/superset/migrations/versions/1d9e835a84f9_.py b/superset/migrations/versions/1d9e835a84f9_.py index 4120788d22fb3..0d5235c7cdc9e 100644 --- a/superset/migrations/versions/1d9e835a84f9_.py +++ b/superset/migrations/versions/1d9e835a84f9_.py @@ -5,11 +5,6 @@ Create Date: 2018-07-16 18:04:07.764659 """ -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function -from __future__ import unicode_literals - from alembic import op import sqlalchemy as sa from sqlalchemy.sql import expression diff --git a/superset/migrations/versions/21e88bc06c02_annotation_migration.py b/superset/migrations/versions/21e88bc06c02_annotation_migration.py index 3d53d16951494..9a0e407eb0476 100644 --- a/superset/migrations/versions/21e88bc06c02_annotation_migration.py +++ b/superset/migrations/versions/21e88bc06c02_annotation_migration.py @@ -1,8 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function -from __future__ import unicode_literals import json from alembic import op diff --git a/superset/migrations/versions/289ce07647b_add_encrypted_password_field.py b/superset/migrations/versions/289ce07647b_add_encrypted_password_field.py index cd5c108448e4f..56fa53aed0cb4 100644 --- a/superset/migrations/versions/289ce07647b_add_encrypted_password_field.py +++ b/superset/migrations/versions/289ce07647b_add_encrypted_password_field.py @@ -6,10 +6,6 @@ Create Date: 2015-11-21 11:18:00.650587 """ -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function -from __future__ import unicode_literals from alembic import op import sqlalchemy as sa diff --git a/superset/migrations/versions/2fcdcb35e487_saved_queries.py b/superset/migrations/versions/2fcdcb35e487_saved_queries.py index da276cc887108..6db0e6f553ab1 100644 --- a/superset/migrations/versions/2fcdcb35e487_saved_queries.py +++ b/superset/migrations/versions/2fcdcb35e487_saved_queries.py @@ -6,11 +6,6 @@ Create Date: 2017-03-29 15:04:35.734190 """ -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function -from __future__ import unicode_literals - from alembic import op import sqlalchemy as sa diff --git a/superset/migrations/versions/33d996bcc382_update_slice_model.py b/superset/migrations/versions/33d996bcc382_update_slice_model.py index ad705073a3100..28ef8310a3fe7 100644 --- a/superset/migrations/versions/33d996bcc382_update_slice_model.py +++ b/superset/migrations/versions/33d996bcc382_update_slice_model.py @@ -1,8 +1,4 @@ # -*- coding: utf-8 -*- -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function -from __future__ import unicode_literals from alembic import op import sqlalchemy as sa from superset import db diff --git a/superset/migrations/versions/3dda56f1c4c6_migrate_num_period_compare_and_period_.py b/superset/migrations/versions/3dda56f1c4c6_migrate_num_period_compare_and_period_.py index 475252fbf2bbe..5f7704e03cf5e 100644 --- a/superset/migrations/versions/3dda56f1c4c6_migrate_num_period_compare_and_period_.py +++ b/superset/migrations/versions/3dda56f1c4c6_migrate_num_period_compare_and_period_.py @@ -6,8 +6,6 @@ """ -from __future__ import division - # revision identifiers, used by Alembic. import datetime diff --git a/superset/migrations/versions/41f6a59a61f2_database_options_for_sql_lab.py b/superset/migrations/versions/41f6a59a61f2_database_options_for_sql_lab.py index 70c5253f7aa01..484d0935dd421 100644 --- a/superset/migrations/versions/41f6a59a61f2_database_options_for_sql_lab.py +++ b/superset/migrations/versions/41f6a59a61f2_database_options_for_sql_lab.py @@ -6,10 +6,6 @@ Create Date: 2016-08-31 10:26:37.969107 """ -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function -from __future__ import unicode_literals from alembic import op import sqlalchemy as sa diff --git a/superset/migrations/versions/430039611635_log_more.py b/superset/migrations/versions/430039611635_log_more.py index dcc40f0695a81..ac84aeb195b0b 100644 --- a/superset/migrations/versions/430039611635_log_more.py +++ b/superset/migrations/versions/430039611635_log_more.py @@ -6,11 +6,6 @@ Create Date: 2016-02-10 08:47:28.950891 """ -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function -from __future__ import unicode_literals - from alembic import op import sqlalchemy as sa diff --git a/superset/migrations/versions/4fa88fe24e94_owners_many_to_many.py b/superset/migrations/versions/4fa88fe24e94_owners_many_to_many.py index fd4e711da47e6..edcb6db5ea3a6 100644 --- a/superset/migrations/versions/4fa88fe24e94_owners_many_to_many.py +++ b/superset/migrations/versions/4fa88fe24e94_owners_many_to_many.py @@ -6,11 +6,6 @@ Create Date: 2016-04-15 17:58:33.842012 """ -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function -from __future__ import unicode_literals - # revision identifiers, used by Alembic. revision = '4fa88fe24e94' down_revision = 'b4456560d4f3' diff --git a/superset/migrations/versions/5ccf602336a0_.py b/superset/migrations/versions/5ccf602336a0_.py index 16cdd55f48bc5..6e3f3de0b04e1 100644 --- a/superset/migrations/versions/5ccf602336a0_.py +++ b/superset/migrations/versions/5ccf602336a0_.py @@ -5,11 +5,6 @@ Create Date: 2018-04-12 16:00:47.639218 """ -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function -from __future__ import unicode_literals - # revision identifiers, used by Alembic. revision = '5ccf602336a0' down_revision = ('130915240929', 'c9495751e314') diff --git a/superset/migrations/versions/6414e83d82b7_.py b/superset/migrations/versions/6414e83d82b7_.py index c0c2bc60aa1dd..869b6a25883a0 100644 --- a/superset/migrations/versions/6414e83d82b7_.py +++ b/superset/migrations/versions/6414e83d82b7_.py @@ -6,11 +6,6 @@ Create Date: 2016-12-19 09:57:05.814013 """ -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function -from __future__ import unicode_literals - # revision identifiers, used by Alembic. revision = '6414e83d82b7' down_revision = ('525c854f0005', 'f1f2d4af5b90') diff --git a/superset/migrations/versions/705732c70154_.py b/superset/migrations/versions/705732c70154_.py index b1cefd35a3874..a4e2db68eaf77 100644 --- a/superset/migrations/versions/705732c70154_.py +++ b/superset/migrations/versions/705732c70154_.py @@ -5,11 +5,6 @@ Create Date: 2018-07-22 21:51:19.235558 """ -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function -from __future__ import unicode_literals - # revision identifiers, used by Alembic. revision = '705732c70154' down_revision = ('4451805bbaa1', '1d9e835a84f9') diff --git a/superset/migrations/versions/836c0bf75904_cache_timeouts.py b/superset/migrations/versions/836c0bf75904_cache_timeouts.py index 8b65ef9c65209..14f4f1bab73b1 100644 --- a/superset/migrations/versions/836c0bf75904_cache_timeouts.py +++ b/superset/migrations/versions/836c0bf75904_cache_timeouts.py @@ -6,11 +6,6 @@ Create Date: 2016-03-17 08:40:03.186534 """ -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function -from __future__ import unicode_literals - # revision identifiers, used by Alembic. revision = '836c0bf75904' down_revision = '18e88e1cc004' diff --git a/superset/migrations/versions/867bf4f117f9_adding_extra_field_to_database_model.py b/superset/migrations/versions/867bf4f117f9_adding_extra_field_to_database_model.py index f4e44b3ec0e82..af18e05a03063 100644 --- a/superset/migrations/versions/867bf4f117f9_adding_extra_field_to_database_model.py +++ b/superset/migrations/versions/867bf4f117f9_adding_extra_field_to_database_model.py @@ -6,11 +6,6 @@ Create Date: 2016-04-03 15:23:20.280841 """ -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function -from __future__ import unicode_literals - # revision identifiers, used by Alembic. revision = '867bf4f117f9' down_revision = 'fee7b758c130' diff --git a/superset/migrations/versions/8e80a26a31db_.py b/superset/migrations/versions/8e80a26a31db_.py index 11176011e4439..c9e45dc600101 100644 --- a/superset/migrations/versions/8e80a26a31db_.py +++ b/superset/migrations/versions/8e80a26a31db_.py @@ -6,11 +6,6 @@ Create Date: 2016-01-13 20:24:45.256437 """ -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function -from __future__ import unicode_literals - # revision identifiers, used by Alembic. revision = '8e80a26a31db' down_revision = '2591d77e9831' diff --git a/superset/migrations/versions/956a063c52b3_adjusting_key_length.py b/superset/migrations/versions/956a063c52b3_adjusting_key_length.py index 89f460936257d..c8ff99755f562 100644 --- a/superset/migrations/versions/956a063c52b3_adjusting_key_length.py +++ b/superset/migrations/versions/956a063c52b3_adjusting_key_length.py @@ -6,11 +6,6 @@ Create Date: 2016-05-11 17:28:32.407340 """ -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function -from __future__ import unicode_literals - from alembic import op import sqlalchemy as sa diff --git a/superset/migrations/versions/a6c18f869a4e_query_start_running_time.py b/superset/migrations/versions/a6c18f869a4e_query_start_running_time.py index b41a525c67c0f..c1d6b950d4e92 100644 --- a/superset/migrations/versions/a6c18f869a4e_query_start_running_time.py +++ b/superset/migrations/versions/a6c18f869a4e_query_start_running_time.py @@ -6,11 +6,6 @@ Create Date: 2017-03-28 11:28:41.387182 """ -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function -from __future__ import unicode_literals - from alembic import op import sqlalchemy as sa diff --git a/superset/migrations/versions/a9c47e2c1547_add_impersonate_user_to_dbs.py b/superset/migrations/versions/a9c47e2c1547_add_impersonate_user_to_dbs.py index c0961d292941c..1281976e3a0cf 100644 --- a/superset/migrations/versions/a9c47e2c1547_add_impersonate_user_to_dbs.py +++ b/superset/migrations/versions/a9c47e2c1547_add_impersonate_user_to_dbs.py @@ -6,11 +6,6 @@ Create Date: 2017-08-31 17:35:58.230723 """ -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function -from __future__ import unicode_literals - # revision identifiers, used by Alembic. revision = 'a9c47e2c1547' down_revision = 'ca69c70ec99b' diff --git a/superset/migrations/versions/b347b202819b_.py b/superset/migrations/versions/b347b202819b_.py index 26e5c2031ea05..bd41d2216b28e 100644 --- a/superset/migrations/versions/b347b202819b_.py +++ b/superset/migrations/versions/b347b202819b_.py @@ -6,11 +6,6 @@ Create Date: 2016-09-19 17:22:40.138601 """ -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function -from __future__ import unicode_literals - # revision identifiers, used by Alembic. revision = 'b347b202819b' down_revision = ('33d996bcc382', '65903709c321') diff --git a/superset/migrations/versions/b4456560d4f3_change_table_unique_constraint.py b/superset/migrations/versions/b4456560d4f3_change_table_unique_constraint.py index 4b0613dd0502e..f6b89d829e9a2 100644 --- a/superset/migrations/versions/b4456560d4f3_change_table_unique_constraint.py +++ b/superset/migrations/versions/b4456560d4f3_change_table_unique_constraint.py @@ -6,10 +6,6 @@ Create Date: 2016-04-15 08:31:26.249591 """ -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function -from __future__ import unicode_literals from alembic import op # revision identifiers, used by Alembic. diff --git a/superset/migrations/versions/bf706ae5eb46_cal_heatmap_metric_to_metrics.py b/superset/migrations/versions/bf706ae5eb46_cal_heatmap_metric_to_metrics.py index e1c6b3f58efd2..2c0df1c68e988 100644 --- a/superset/migrations/versions/bf706ae5eb46_cal_heatmap_metric_to_metrics.py +++ b/superset/migrations/versions/bf706ae5eb46_cal_heatmap_metric_to_metrics.py @@ -5,11 +5,6 @@ Create Date: 2018-04-10 11:19:47.621878 """ -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function -from __future__ import unicode_literals - import json from alembic import op diff --git a/superset/migrations/versions/c3a8f8611885_materializing_permission.py b/superset/migrations/versions/c3a8f8611885_materializing_permission.py index b0ac94c468d47..f852df68fb0d2 100644 --- a/superset/migrations/versions/c3a8f8611885_materializing_permission.py +++ b/superset/migrations/versions/c3a8f8611885_materializing_permission.py @@ -6,11 +6,6 @@ Create Date: 2016-04-25 08:54:04.303859 """ -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function -from __future__ import unicode_literals - from alembic import op import sqlalchemy as sa from sqlalchemy import Column, ForeignKey, Integer, String diff --git a/superset/migrations/versions/c9495751e314_.py b/superset/migrations/versions/c9495751e314_.py index 52a57aa3f47c7..c80277693a583 100644 --- a/superset/migrations/versions/c9495751e314_.py +++ b/superset/migrations/versions/c9495751e314_.py @@ -5,11 +5,6 @@ Create Date: 2018-04-10 20:46:57.890773 """ -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function -from __future__ import unicode_literals - # revision identifiers, used by Alembic. revision = 'c9495751e314' down_revision = ('30bb17c0dc76', 'bf706ae5eb46') diff --git a/superset/migrations/versions/d6db5a5cdb5d_.py b/superset/migrations/versions/d6db5a5cdb5d_.py index d5b996e3cd2de..3e7a76ae82280 100644 --- a/superset/migrations/versions/d6db5a5cdb5d_.py +++ b/superset/migrations/versions/d6db5a5cdb5d_.py @@ -6,11 +6,6 @@ Create Date: 2017-02-10 17:58:20.149960 """ -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function -from __future__ import unicode_literals - # revision identifiers, used by Alembic. revision = 'd6db5a5cdb5d' down_revision = ('a99f2f7c195a', 'bcf3126872fc') diff --git a/superset/migrations/versions/e46f2d27a08e_materialize_perms.py b/superset/migrations/versions/e46f2d27a08e_materialize_perms.py index 80f796182420e..d4a10419ecde4 100644 --- a/superset/migrations/versions/e46f2d27a08e_materialize_perms.py +++ b/superset/migrations/versions/e46f2d27a08e_materialize_perms.py @@ -6,11 +6,6 @@ Create Date: 2016-11-14 15:23:32.594898 """ -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function -from __future__ import unicode_literals - # revision identifiers, used by Alembic. revision = 'e46f2d27a08e' down_revision = 'c611f2b591b8' diff --git a/superset/migrations/versions/ef8843b41dac_.py b/superset/migrations/versions/ef8843b41dac_.py index 6c309e2033aa6..561272254671c 100644 --- a/superset/migrations/versions/ef8843b41dac_.py +++ b/superset/migrations/versions/ef8843b41dac_.py @@ -6,11 +6,6 @@ Create Date: 2016-10-02 10:35:38.825231 """ -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function -from __future__ import unicode_literals - # revision identifiers, used by Alembic. revision = 'ef8843b41dac' down_revision = ('3b626e2a6783', 'ab3d66c4246e')