# Generated manually to fix utf8mb4 charset for emoji support

from django.db import migrations

class Migration(migrations.Migration):

    dependencies = [
        ('ml_service', '0003_schedulednotification_is_read_and_more'),
    ]

    operations = [
        migrations.RunSQL(
            # Convert notification_title column to utf8mb4
            # Django uses app_name_model_name format for table names
            sql="ALTER TABLE ml_service_schedulednotification MODIFY COLUMN notification_title VARCHAR(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL;",
            reverse_sql="ALTER TABLE ml_service_schedulednotification MODIFY COLUMN notification_title VARCHAR(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL;",
        ),
        migrations.RunSQL(
            # Convert notification_body column to utf8mb4 (Text field)
            sql="ALTER TABLE ml_service_schedulednotification MODIFY COLUMN notification_body TEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL;",
            reverse_sql="ALTER TABLE ml_service_schedulednotification MODIFY COLUMN notification_body TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NULL;",
        ),
    ]

