# Generated by Django 2.1 on 2020-05-26 16:58
from django.db import migrations

# Running FULL TEXT migrations only if databse engine is mysql
# We should later find the syntax for FULL TEXT capabilities in other popular engines
def forwards(apps, schema_editor):
  if not schema_editor.connection.vendor.startswith('mysql'):
      print('Database vendor: {}'.format(schema_editor.connection.vendor))
      print('Skipping migration without attempting to ADD FULL TEXT SEARCH')
      return

  migrations.RunSQL('ALTER TABLE on_demand_userdetails ADD FULLTEXT (description)')

class Migration(migrations.Migration):

    dependencies = [
        ('on_demand', '0001_initial'),
    ]

    operations = [
        migrations.RunPython(forwards)
    ]
