# Path: kittystore/storm/schema/utils.py
# def get_db_type(store):
#     database = store.get_database()
#     return database.__class__.__module__.split(".")[-1]


from .utils import get_db_type
# -*- coding: utf-8 -*-

from __future__ import absolute_import



SQL = {
    "sqlite": [
        'CREATE INDEX "ix_thread_list_name" ON "thread" (list_name);',
        ],
    "postgres": [
        'CREATE INDEX "ix_thread_list_name" ON "thread" (list_name);',
        ],
    "mysql": [
        'CREATE INDEX `ix_thread_list_name` ON `thread` (list_name);',
        ],
    }


def apply(store):
    """Add indexes on thread.list_name"""

# Path: kittystore/storm/schema/utils.py
# def get_db_type(store):
#     database = store.get_database()
#     return database.__class__.__module__.split(".")[-1]


# Path: kittystore/storm/schema/patch_11.py
from .utils import get_db_type

# -*- coding: utf-8 -*-

from __future__ import absolute_import



SQL = {
    "sqlite": [
        'CREATE INDEX "ix_thread_list_name" ON "thread" (list_name);',
        ],
    "postgres": [
        'CREATE INDEX "ix_thread_list_name" ON "thread" (list_name);',
        ],
    "mysql": [
        'CREATE INDEX `ix_thread_list_name` ON `thread` (list_name);',
        ],
    }


def apply(store):
    """Add indexes on thread.list_name"""

    dbtype = get_db_type(store)