From f4e8b0630efdf2d7f3dcafa5c790aa0749b778d7 Mon Sep 17 00:00:00 2001 From: x4base Date: Thu, 28 Apr 2016 19:25:31 +0800 Subject: [PATCH] Fix the bug that breaks the tests --- caravel/migrations/versions/6113409d871f_.py | 3 --- caravel/migrations/versions/b4a0abe21630_post_aggs.py | 1 - caravel/models.py | 6 ++++++ 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/caravel/migrations/versions/6113409d871f_.py b/caravel/migrations/versions/6113409d871f_.py index dfe4ddab48157..71ca91cf80d1b 100644 --- a/caravel/migrations/versions/6113409d871f_.py +++ b/caravel/migrations/versions/6113409d871f_.py @@ -10,9 +10,6 @@ revision = '6113409d871f' down_revision = ('c3a8f8611885', 'b4a0abe21630') -from alembic import op -import sqlalchemy as sa - def upgrade(): pass diff --git a/caravel/migrations/versions/b4a0abe21630_post_aggs.py b/caravel/migrations/versions/b4a0abe21630_post_aggs.py index b913323b2ac96..fd8d48ff3921c 100644 --- a/caravel/migrations/versions/b4a0abe21630_post_aggs.py +++ b/caravel/migrations/versions/b4a0abe21630_post_aggs.py @@ -12,7 +12,6 @@ from alembic import op import sqlalchemy as sa -from sqlalchemy.dialects import mysql def upgrade(): diff --git a/caravel/models.py b/caravel/models.py index f35c340e62f84..c3a7d73352b28 100644 --- a/caravel/models.py +++ b/caravel/models.py @@ -535,6 +535,11 @@ def metrics_combo(self): for m in self.metrics], key=lambda x: x[1]) + @property + # TODO: Sqlable shouldn't have this for post aggregators are only for Druid + def post_aggregators_combo(self): + return [] + @property def sql_url(self): return self.database.sql_url + "?table_name=" + str(self.table_name) @@ -1387,6 +1392,7 @@ class DruidPostAggregator(Model): json = Column(Text) description = Column(Text) + class FavStar(Model): __tablename__ = 'favstar'