redash/migrations/0014_migrate_existing_es_to_kibana.py
Lior Rozner 4eb490a839 Code review fix.
Added migration to change all existing elasticsearch datasource to kibana datasource.
2015-10-13 20:14:58 -07:00

11 lines
211 B
Python

__author__ = 'lior'
from redash.models import DataSource
if __name__ == '__main__':
for ds in DataSource.all():
if ds.type == 'elasticsearch':
ds.type = 'kibana'
ds.save()