redash/old_migrations/0014_migrate_existing_es_to_kibana.py
Arik Fraimovich 70d545410d Add Flask-Migrate to the project
Also moved old migrations to old_migrations folder (before deleting them entirely).
2016-12-07 17:59:01 +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)