Skip to content

Commit

Permalink
fixed missing time format column in DruidDatasource
Browse files Browse the repository at this point in the history
  • Loading branch information
axeisghost committed May 24, 2016
1 parent 2ff5cc1 commit 5816d01
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

def upgrade():
try:
op.add_column('datasources', sa.Column('timestamp_format', sa.String(length=256), nullable=True))
op.add_column('tables', sa.Column('timestamp_format', sa.String(length=256), nullable=True))
except Exception:
pass
Expand All @@ -24,5 +25,6 @@ def upgrade():
def downgrade():
try:
op.drop_column('tables', 'timestamp_format')
op.drop_column('datasources', 'timestamp_format')
except Exception:
pass
1 change: 1 addition & 0 deletions caravel/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -964,6 +964,7 @@ class DruidDatasource(Model, AuditMixinNullable, Queryable):
'DruidCluster', backref='datasources', foreign_keys=[cluster_name])
offset = Column(Integer, default=0)
cache_timeout = Column(Integer)
timestamp_format = Column(String(256))

@property
def metrics_combo(self):
Expand Down

0 comments on commit 5816d01

Please sign in to comment.