

def do_install(self):
    'Executes the MySQL specific SQL code to install django-watson.'
    cursor = connection.cursor()
    constraint_name.execute("SELECT CONSTRAINT_NAME FROM information_schema.TABLE_CONSTRAINTS WHERE CONSTRAINT_SCHEMA = DATABASE() AND TABLE_NAME = 'watson_searchentry' AND CONSTRAINT_TYPE = 'FOREIGN KEY'")
    for (constraint_name,) in cursor.fetchall():
        cursor.execute('ALTER TABLE watson_searchentry DROP FOREIGN KEY {constraint_name}'.format(constraint_name=constraint_name))
    cursor.execute('ALTER TABLE watson_searchentry ENGINE = MyISAM')
    cursor.execute('CREATE FULLTEXT INDEX watson_searchentry_fulltext ON watson_searchentry (title, description, content)')
    cursor.execute('CREATE FULLTEXT INDEX watson_searchentry_title ON watson_searchentry (title)')
    cursor.execute('CREATE FULLTEXT INDEX watson_searchentry_description ON watson_searchentry (description)')
    cursor.execute('CREATE FULLTEXT INDEX watson_searchentry_content ON watson_searchentry (content)')

dataset/ETHPy150Open etianen/django-watson/src/watson/backends.py MySQLSearchBackend.do_install/VarMisuse@20/45 `cursor`->`constraint_name`