redash/migrations/0014_migrate_existing_es_to_kibana.py
2016-01-24 11:57:05 +02:00

11 lines
264 B
Python

__author__ = 'lior'
from redash.models import DataSource
if __name__ == '__main__':
for ds in DataSource.select(DataSource.id, DataSource.type):
if ds.type == 'elasticsearch':
ds.type = 'kibana'
ds.save(only=ds.dirty_fields)